Skip to content

API refactoring #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 122 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
e07ea3d
Remove keys
allnes May 17, 2025
a0e20fc
Fix docs and reports
allnes May 17, 2025
018b685
Change mpi libs
allnes May 17, 2025
37c1842
Unite libs
allnes May 18, 2025
e93c104
first uniting tests
allnes May 18, 2025
1c9da2e
second part uniting tests
allnes May 18, 2025
9570c53
3rd part perf unifying tests
allnes May 19, 2025
594201a
4th part perf unifying tests
allnes May 19, 2025
15e673f
Change API
allnes May 19, 2025
ec82c6a
update func tests
allnes May 19, 2025
b6c406f
update omp task
allnes May 19, 2025
33ae009
update seq task
allnes May 21, 2025
483834a
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes May 21, 2025
984570e
fix core tests
allnes May 23, 2025
afa6fe1
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes May 23, 2025
a0a5ef0
fix clang format
allnes May 23, 2025
7d671e0
update dir
allnes May 23, 2025
276601b
unite binaries
allnes May 24, 2025
9cce2f3
Refactor test parametrization and naming for clarity
allnes May 28, 2025
a8fdefd
Refactor test and script logic to improve task handling
allnes May 28, 2025
d4ed8d3
Refactor test and script logic for improved readability
allnes May 28, 2025
cdca4e0
Refactor performance test parameter handling.
allnes May 28, 2025
c6edfda
Refactor functional tests to use BaseRunFuncTests.
allnes May 29, 2025
376dfa4
Refactor test utilities and improve image handling.
allnes May 29, 2025
ee536fe
Refactor test execution and data handling in func_tests
allnes May 29, 2025
c81c99b
Refactor test suite instantiation for modularity.
allnes May 29, 2025
1148c77
Refactor test parameters to use GTestFuncParam alias
allnes May 29, 2025
929d357
Refactor task generation macro for clarity and simplicity
allnes May 29, 2025
bb725d2
Rename task classes and enums for improved clarity.
allnes May 29, 2025
21f1dcf
Refactor test parameter handling for clarity and flexibility
allnes May 29, 2025
5016f3d
Refactor type usage and improve code clarity.
allnes May 29, 2025
9172d07
Refactor test parameter handling and fix type consistency.
allnes May 29, 2025
f05e6a8
Refactor index types to use `std::vector<int>::size_type`.
allnes May 29, 2025
d413536
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes May 29, 2025
404f6f4
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes May 30, 2025
84cc083
Use std::abort instead of std::exit for termination
allnes May 30, 2025
e240d51
Unify task namespaces and refactor common functionality.
allnes May 31, 2025
d8f9a49
Refactor task type handling and improve performance tracking.
allnes May 31, 2025
2a6f8fc
Refactor code to consistently use namespaces.
allnes May 31, 2025
c5881e8
Refactor test file structure for consistency
allnes Jun 2, 2025
12436c3
Rename and update image file path in functional test.
allnes Jun 2, 2025
c8555af
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes Jun 2, 2025
6a29e89
Refactor: Replace GetPPCNumThreads with GetNumThreads
allnes Jun 2, 2025
65a8880
Add JSON integration and task status/type handling
allnes Jun 3, 2025
99f0a6a
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes Jun 3, 2025
5b91f8e
Refactor: Move and adjust `GetStringParamName` function
allnes Jun 3, 2025
4340dd4
Rename macro ADD_PERF_MODES to ADD_PERF_TASK.
allnes Jun 3, 2025
1ce11d2
Refactor and modularize test utilities.
allnes Jun 3, 2025
e01b19d
Set C++ standard as required in CMake configuration
allnes Jun 3, 2025
1579663
Remove unused JSON include and adjust const qualifier.
allnes Jun 3, 2025
2e36d52
Fix incorrect usage of `constexpr` and redundant `const` casts
allnes Jun 3, 2025
151a1ce
Set C++ standard to C++20 for Clang builds
allnes Jun 3, 2025
38c32e9
Update test parameters in functional test
allnes Jun 3, 2025
76dd44a
Refactor tasks to simplify matrix operations and input handling
allnes Jun 3, 2025
dc6d8ba
Add <atomic> include and fix OpenMP shared directive
allnes Jun 3, 2025
ba1ba02
Refactor member variable naming and initialization.
allnes Jun 3, 2025
b51ab41
Add Intel oneAPI setup for OpenMP in GitHub Actions
allnes Jun 4, 2025
dd19a31
Update main.yml
allnes Jun 4, 2025
90796b5
Update main.yml
allnes Jun 4, 2025
e997ee8
Update main.yml
allnes Jun 4, 2025
a2e4f11
Refactor threading and parallelism logic in tasks.
allnes Jun 4, 2025
0267deb
Enable core run for threads and processes in test runner
allnes Jun 4, 2025
a42c6be
Add debug logs for task input and output in test utility
allnes Jun 4, 2025
ab2242f
Add OMP thread control and refactor environment handling
allnes Jun 4, 2025
93b19ba
**Replace `exit` with `std::terminate` and refine error handling**
allnes Jun 4, 2025
431496f
Filter out death tests in run_tests.py
allnes Jun 4, 2025
c75efb6
Add Valgrind suppression file and integrate into test script
allnes Jun 4, 2025
3837166
Refactor for modern C++ features and cleanup.
allnes Jun 4, 2025
dc93e46
Use Valgrind suppression files and replace `exit` with `MPI_Abort`
allnes Jun 4, 2025
198cea9
Set C++ standard to 23 unconditionally
allnes Jun 4, 2025
bb8a044
Refactor runners directory and add ASAN-specific handling
allnes Jun 5, 2025
5d9109d
Add PPC_ASAN_RUN logic and refactor task/test macros
allnes Jun 5, 2025
ba8011a
Add libenvpp integration and improve thread/environment handling
allnes Jun 6, 2025
0da828b
Remove PPC_ASAN_RUN logic and simplify build/test configurations
allnes Jun 6, 2025
8c6e9ff
Expand Valgrind suppression file for additional leaks
allnes Jun 7, 2025
110cd96
Remove Valgrind suppression file and simplify command
allnes Jun 7, 2025
92d7b85
Refactor OpenMP thread handling and remove redundant `omp_set_num_thr…
allnes Jun 7, 2025
647bf7e
Remove redundant CMake flag `-DCMAKE_CXX_FLAGS=-Wno-error=switch-enum`
allnes Jun 7, 2025
76a13a4
Refactor example tasks to `example_threads` and streamline task/test …
allnes Jun 8, 2025
b7513af
Fix inconsistent spacing and formatting in `util.hpp` and `util.cpp`
allnes Jun 8, 2025
68f93bb
Rename tests and update filters to disable Valgrind-specific cases
allnes Jun 8, 2025
751a475
Refactor type extraction logic in `Demangle` for improved clarity and…
allnes Jun 8, 2025
d729919
Switch Windows build configuration to use LLVM and GCC tooling
allnes Jun 8, 2025
82896be
Switch Windows MPI setup from MS-MPI to MPICH
allnes Jun 8, 2025
e7220ec
Switch to `mpi4py/setup-mpi` for MPI setup in Windows builds
allnes Jun 8, 2025
8856a71
Switch Windows build configuration from GCC to MSVC and update CMake …
allnes Jun 8, 2025
d42fd48
Update LLVM GitHub action to v2 and set version to 20.1.4
allnes Jun 8, 2025
54f5e9a
Update Windows build to include `CMAKE_PREFIX_PATH` for LLVM
allnes Jun 8, 2025
11d5777
Add `example_processes` task with MPI and SEQ modes
allnes Jun 8, 2025
5403c40
Switch performance and functional tests in `example_processes` to use…
allnes Jun 8, 2025
f45801a
Update CMake to link `fmtd` in Debug mode on non-MSVC builds
allnes Jun 8, 2025
f5aca53
Refactor `CMakeLists.txt` to simplify `target_link_libraries` logic a…
allnes Jun 8, 2025
3816898
Switch `ubuntu-gcc-build-codecov` to Ninja and comment out `needs` de…
allnes Jun 8, 2025
ad308fe
Merge remote-tracking branch 'origin/an/unite-tests' into an/unite-tests
allnes Jun 8, 2025
a4d58a1
Expand GitHub Actions triggers and uncomment `needs` dependencies in …
allnes Jun 8, 2025
48fd9d9
Refactor imports and update JSON pointer initialization across multip…
allnes Jun 8, 2025
9a5a272
Simplify codecov ignore patterns to focus on task-related tests and r…
allnes Jun 8, 2025
72cae17
Simplify codecov ignore patterns to focus on task-related tests and r…
allnes Jun 8, 2025
b629680
Merge remote-tracking branch 'origin/an/unite-tests' into an/unite-tests
allnes Jun 8, 2025
d352ce0
Refactor task and test initialization methods, improve naming consist…
allnes Jun 8, 2025
1472579
Refactor test suite instantiations, consolidate test name utilities, …
allnes Jun 8, 2025
5b95764
Refactor test folder structure, update imports, adjust CMake and Code…
allnes Jun 8, 2025
82ec6f3
Remove `run_perf_counter.py`, `performance-list` option, and related …
allnes Jun 8, 2025
d1f9626
Simplify apt package list in static analysis GitHub workflow by remov…
allnes Jun 8, 2025
ab415f8
Replace `libmpich-dev` with OpenMPI packages in static analysis workf…
allnes Jun 8, 2025
149f0e0
Update GitHub Actions and Codecov ignore patterns to exclude module t…
allnes Jun 8, 2025
c1e5530
Adjust performance test parameters and computation to improve consist…
allnes Jun 12, 2025
9aadb72
Update CMakeLists.txt
allnes Jun 13, 2025
d3842c7
Update settings.json
allnes Jun 13, 2025
201a6d3
Update settings.json
allnes Jun 13, 2025
1df223e
Replace `fmt::println` with `std::cerr` and `std::format` for error l…
allnes Jun 13, 2025
dc2f909
Add `private` access specifier for implementation methods in task hea…
allnes Jun 13, 2025
d9a890f
Refine CMake library source file glob patterns to explicitly target .…
allnes Jun 13, 2025
2604844
Replace `fmt` with `std::format` and `std::cerr`, adjust test suite i…
allnes Jun 13, 2025
9d07107
Refactor functional and performance runners by extracting MPI-related…
allnes Jun 13, 2025
578d829
Rename `perf` module to `performance` across headers, sources, and te…
allnes Jun 13, 2025
daac04d
Anonymize student data in `example_processes` and `example_threads` t…
allnes Jun 14, 2025
e16b65d
Include missing utility headers in `performance` test files and `runn…
allnes Jun 14, 2025
ae2f207
Merge branch 'master' of https://github.com/learning-process/parallel…
allnes Jun 14, 2025
b6356f9
Simplify TBB library linking in `core` CMake configuration by using `…
allnes Jun 14, 2025
e4d463e
Unify and streamline test configuration in `CMakeLists.txt` using hel…
allnes Jun 14, 2025
bda4270
Simplify library linking in `core` CMake configuration by introducing…
allnes Jun 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 82 additions & 27 deletions .github/workflows/main.yml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .github/workflows/static-analysis-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
id: review
with:
build_dir: build
apt_packages: mpich,libmpich*,mpi*,openmpi-bin,ninja-build,libomp-19-dev,valgrind
apt_packages: openmpi-bin,openmpi-common,libopenmpi-dev,ninja-build,libomp-19-dev,valgrind
cmake_command: >
cmake -S . -B build
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
id: review
with:
build_dir: build
apt_packages: mpich,libmpich*,mpi*,openmpi-bin,ninja-build,libomp-19-dev,valgrind
apt_packages: openmpi-bin,openmpi-common,libopenmpi-dev,ninja-build,libomp-19-dev,valgrind
cmake_command: >
cmake -S . -B build
-D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
Expand Down
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
[submodule "3rdparty/stb"]
path = 3rdparty/stb
url = https://github.com/nothings/stb
[submodule "3rdparty/json"]
path = 3rdparty/json
url = https://github.com/nlohmann/json
[submodule "3rdparty/libenvpp"]
path = 3rdparty/libenvpp
url = https://github.com/ph3at/libenvpp
1 change: 1 addition & 0 deletions 3rdparty/json
Submodule json added at c63369
1 change: 1 addition & 0 deletions 3rdparty/libenvpp
Submodule libenvpp added at 86db27
4 changes: 4 additions & 0 deletions 3rdparty/stb_image_wrapper.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#define STB_IMAGE_IMPLEMENTATION

// NOLINTNEXTLINE(misc-include-cleaner)
#include "stb_library.hpp"
1 change: 0 additions & 1 deletion 3rdparty/stb_library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#pragma clang diagnostic ignored "-Wcast-align"
#endif

#define STB_IMAGE_IMPLEMENTATION
#include <stb/stb_image.h>

#if defined(__clang__)
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ message( STATUS "PPC step: First configures" )
include(cmake/configure.cmake)
include(cmake/modes.cmake)
include(cmake/sanitizers.cmake)
include(cmake/json.cmake)
include(cmake/libenvpp.cmake)

################# Parallel programming technologies #################

Expand Down
12 changes: 7 additions & 5 deletions cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif(NOT CMAKE_BUILD_TYPE)

if (MSVC)
add_compile_options("/utf-8")
endif()

set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/arch" )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/lib" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/bin" )
Expand All @@ -22,11 +26,9 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/arch" )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" )
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" )

if ( MSVC AND (CMAKE_C_COMPILER_ID STREQUAL "Clang") AND (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
set( CMAKE_CXX_STANDARD 17 )
else ()
set( CMAKE_CXX_STANDARD 23 )
endif ()
set( CMAKE_CXX_STANDARD 23 )

set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_COMPILE_WARNING_AS_ERROR ON)

Expand Down
105 changes: 105 additions & 0 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# ——— Helper function to add & register tests —————————————————————————
function(ppc_add_test test_name test_src USE_FLAG)
if(${USE_FLAG})
add_executable(${test_name} "${PROJECT_SOURCE_DIR}/${test_src}")
enable_testing()
add_test(NAME ${test_name} COMMAND ${test_name})
install(TARGETS ${test_name} RUNTIME DESTINATION bin)
endif()
endfunction()

# Function to configure tests
function(add_tests test_flag exec_target subdir)
if(${test_flag})
# Gather all source files under tests/<subdir>
file(GLOB_RECURSE src_files
"${TEST_DIR}/${subdir}/*.cpp"
"${TEST_DIR}/${subdir}/*.cxx"
"${TEST_DIR}/${subdir}/*.cc"
)
target_sources(${exec_target} PRIVATE ${src_files})
list(APPEND TEST_EXECUTABLES ${exec_target})
set(TEST_EXECUTABLES "${TEST_EXECUTABLES}" PARENT_SCOPE)
endif()
endfunction()

# ============================================================================
# Function: setup_implementation
# - NAME: implementation sub‐directory name (e.g. “mpi”)
# - PROJ_NAME: project base name
# - BASE_DIR: root source directory
# - TESTS: list of test executables to link against
# ============================================================================
function(setup_implementation)
# parse named args: NAME, PROJ_NAME, BASE_DIR; multi‐value: TESTS
cmake_parse_arguments(
SETUP
"" # no plain options
"NAME;PROJ_NAME;BASE_DIR"
"TESTS"
${ARGN}
)

# skip if impl dir doesn't exist
set(IMP_DIR "${SETUP_BASE_DIR}/${SETUP_NAME}")
if(NOT EXISTS "${IMP_DIR}")
return()
endif()
message(STATUS " -- ${SETUP_NAME}")

# collect sources
file(GLOB_RECURSE CPP_SOURCES "${IMP_DIR}/src/*.cpp")
file(GLOB_RECURSE ALL_SOURCES
"${IMP_DIR}/include/*.h"
"${IMP_DIR}/include/*.hpp"
"${IMP_DIR}/src/*.cpp"
)

# create library (STATIC if .cpp exist, otherwise INTERFACE)
set(LIB_NAME "${SETUP_PROJ_NAME}_${SETUP_NAME}")
if(CPP_SOURCES)
add_library(${LIB_NAME} STATIC ${ALL_SOURCES})
else()
add_library(${LIB_NAME} INTERFACE ${ALL_SOURCES})
endif()

# link core module
target_link_libraries(${LIB_NAME} PUBLIC core_module_lib)

# and link into each enabled test executable
foreach(test_exec ${SETUP_TESTS})
target_link_libraries(${test_exec} PUBLIC ${LIB_NAME})
endforeach()
endfunction()

# Function to configure each subproject
function(ppc_configure_subproject SUBDIR)
# Module-specific compile-time definitions
add_compile_definitions(
PPC_SETTINGS_${SUBDIR}="${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/settings.json"
PPC_ID_${SUBDIR}="${SUBDIR}"
)

# Switch project context to the subproject
project(${SUBDIR})

# Directory with tests and list of test executables (populated by setup_implementation)
set(TEST_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}/tests")
set(TEST_EXECUTABLES "")

# Register functional and performance test runners
add_tests(USE_FUNC_TESTS ${FUNC_TEST_EXEC} functional)
add_tests(USE_PERF_TESTS ${PERF_TEST_EXEC} performance)

message(STATUS "${SUBDIR}")

# List of implementations to configure
foreach(IMPL IN LISTS IMPLEMENTATIONS)
setup_implementation(
NAME ${IMPL}
PROJ_NAME ${SUBDIR}
TESTS "${TEST_EXECUTABLES}"
BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/${SUBDIR}"
)
endforeach()
endfunction()
12 changes: 12 additions & 0 deletions cmake/json.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/json/include)
include(ExternalProject)
ExternalProject_Add(ppc_json
SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdparty/json"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ppc_json"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build"
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/install"
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/json/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build/"
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-D CMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -D CMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build" --config ${CMAKE_BUILD_TYPE} --parallel
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_json/install")
27 changes: 27 additions & 0 deletions cmake/libenvpp.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/include)
include_directories(SYSTEM ${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/external/fmt/include)

include(ExternalProject)
ExternalProject_Add(ppc_libenvpp
SOURCE_DIR "${CMAKE_SOURCE_DIR}/3rdparty/libenvpp"
PREFIX "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp"
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build"
INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install"
CONFIGURE_COMMAND "${CMAKE_COMMAND}" -S "${CMAKE_SOURCE_DIR}/3rdparty/libenvpp/" -B "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build/"
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -G${CMAKE_GENERATOR} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-D CMAKE_C_COMPILER_LAUNCHER=${CMAKE_C_COMPILER_LAUNCHER} -D CMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
BUILD_COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --config ${CMAKE_BUILD_TYPE} --parallel
INSTALL_COMMAND "${CMAKE_COMMAND}" --install "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/build" --prefix "${CMAKE_CURRENT_BINARY_DIR}/ppc_libenvpp/install")

string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_lower)
if(cmake_build_type_lower STREQUAL "debug")
set(PPC_FMT_LIB_NAME fmtd)
else()
set(PPC_FMT_LIB_NAME fmt)
endif()

if(MSVC)
set(PPC_ENVPP_LIB_NAME libenvpp)
else()
set(PPC_ENVPP_LIB_NAME envpp)
endif ()
14 changes: 6 additions & 8 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
ignore:
- "**/perf_tests/**"
- "**/func_tests/**"
- "**/all/runner.cpp"
- "**/mpi/runner.cpp"
- "**/omp/runner.cpp"
- "**/seq/runner.cpp"
- "**/stl/runner.cpp"
- "**/tbb/runner.cpp"
- "tasks/**/tests/**"
- "modules/**/tests/**"
- "tasks/common/runners/**"
- "modules/core/util/include/perf_test_util.hpp"
- "modules/core/util/include/func_test_util.hpp"
- "modules/core/util/src/func_test_util.cpp"
coverage:
status:
project:
Expand Down
44 changes: 40 additions & 4 deletions modules/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,54 @@ foreach(subd ${subdirs})
file(GLOB_RECURSE TMP_LIB_SOURCE_FILES ${PATH_PREFIX}/include/* ${PATH_PREFIX}/src/*)
list(APPEND LIB_SOURCE_FILES ${TMP_LIB_SOURCE_FILES})

file(GLOB_RECURSE TMP_FUNC_TESTS_SOURCE_FILES ${PATH_PREFIX}/func_tests/*)
file(GLOB_RECURSE TMP_FUNC_TESTS_SOURCE_FILES ${PATH_PREFIX}/tests/*)
list(APPEND FUNC_TESTS_SOURCE_FILES ${TMP_FUNC_TESTS_SOURCE_FILES})
endforeach()

project(${exec_func_lib})
add_library(${exec_func_lib} STATIC ${LIB_SOURCE_FILES})
set_target_properties(${exec_func_lib} PROPERTIES LINKER_LANGUAGE CXX)

add_dependencies(${exec_func_lib} ppc_libenvpp)
target_link_directories(${exec_func_lib} PUBLIC "${CMAKE_BINARY_DIR}/ppc_libenvpp/install/lib")
target_link_directories(${exec_func_lib} PUBLIC "${CMAKE_BINARY_DIR}/ppc_libenvpp/build")
target_link_libraries(${exec_func_lib} PUBLIC ${PPC_ENVPP_LIB_NAME})
target_link_libraries(${exec_func_lib} PUBLIC ${PPC_FMT_LIB_NAME})

add_dependencies(${exec_func_lib} ppc_json)
target_link_directories(${exec_func_lib} INTERFACE "${CMAKE_BINARY_DIR}/ppc_json/install/include")

add_dependencies(${exec_func_lib} ppc_googletest)
target_link_directories(${exec_func_lib} PUBLIC "${CMAKE_BINARY_DIR}/ppc_googletest/install/lib")
target_link_libraries(${exec_func_lib} PUBLIC gtest gtest_main)

target_link_libraries(${exec_func_lib} PUBLIC Threads::Threads)

find_package(OpenMP REQUIRED)
target_link_libraries(${exec_func_lib} PUBLIC ${OpenMP_libomp_LIBRARY} OpenMP::OpenMP_CXX)

add_dependencies(${exec_func_lib} ppc_onetbb)
target_link_directories(${exec_func_lib} PUBLIC ${CMAKE_BINARY_DIR}/ppc_onetbb/install/lib)
if(NOT MSVC)
target_link_libraries(${exec_func_lib} PUBLIC ${PPC_TBB_LIB_NAME})
endif()

find_package(MPI REQUIRED)
if( MPI_COMPILE_FLAGS )
set_target_properties(${exec_func_lib} PROPERTIES COMPILE_FLAGS "${MPI_COMPILE_FLAGS}")
endif( MPI_COMPILE_FLAGS )

if( MPI_LINK_FLAGS )
set_target_properties(${exec_func_lib} PROPERTIES LINK_FLAGS "${MPI_LINK_FLAGS}")
endif( MPI_LINK_FLAGS )
target_link_libraries(${exec_func_lib} PUBLIC ${MPI_LIBRARIES})


add_library(stb_image STATIC ${CMAKE_SOURCE_DIR}/3rdparty/stb_image_wrapper.cpp)
target_include_directories(stb_image PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty/stb)
target_link_libraries(${exec_func_lib} PUBLIC stb_image)

add_executable(${exec_func_tests} ${FUNC_TESTS_SOURCE_FILES})
add_dependencies(${exec_func_tests} ppc_googletest)
target_link_directories(${exec_func_tests} PUBLIC ${CMAKE_BINARY_DIR}/ppc_googletest/install/lib)
target_link_libraries(${exec_func_tests} PUBLIC gtest gtest_main)

target_link_libraries(${exec_func_tests} PUBLIC ${exec_func_lib})

Expand Down
50 changes: 0 additions & 50 deletions modules/core/perf/func_tests/test_task.hpp

This file was deleted.

Loading
Loading