Skip to content

Commit a604bbc

Browse files
authored
Merge branch 'master' into codex/detect-sphinx-with-find_package
2 parents fd19fdf + ccc6db9 commit a604bbc

File tree

6 files changed

+12
-21
lines changed

6 files changed

+12
-21
lines changed

cmake/configure.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
2828

2929
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
3030

31+
option(USE_COVERAGE "Enable coverage instrumentation" OFF)
32+
3133
if(USE_COVERAGE)
3234
set(CMAKE_INSTALL_RPATH "${CMAKE_BINARY_DIR}/ppc_onetbb/install/lib")
3335
else()
3436
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
3537
endif()
38+
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/ppc_onetbb/install/lib")
3639

37-
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
40+
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
3841
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
3942
set(CMAKE_SKIP_BUILD_RPATH OFF)
4043

cmake/functions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function(ppc_configure_subproject SUBDIR)
8383
message(STATUS "${SUBDIR}")
8484

8585
# List of implementations to configure
86-
foreach(IMPL IN LISTS IMPLEMENTATIONS)
86+
foreach(IMPL IN LISTS PPC_IMPLEMENTATIONS)
8787
setup_implementation(
8888
NAME
8989
${IMPL}

cmake/json.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ function(ppc_link_json exec_func_lib)
2727
PUBLIC ${CMAKE_SOURCE_DIR}/3rdparty/json/include)
2828

2929
add_dependencies(${exec_func_lib} ppc_json)
30-
target_link_directories(${exec_func_lib} INTERFACE
31-
"${CMAKE_BINARY_DIR}/ppc_json/install/include")
30+
target_include_directories(
31+
${exec_func_lib} INTERFACE "${CMAKE_BINARY_DIR}/ppc_json/install/include")
3232
endfunction()

cmake/mpi.cmake

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
1-
find_package(MPI REQUIRED)
1+
find_package(MPI REQUIRED COMPONENTS CXX)
22
if(NOT MPI_FOUND)
33
message(FATAL_ERROR "MPI NOT FOUND")
44
endif()
55

66
function(ppc_link_mpi exec_func_lib)
7-
if(MPI_COMPILE_FLAGS)
8-
set_target_properties(${exec_func_lib} PROPERTIES COMPILE_FLAGS
9-
"${MPI_COMPILE_FLAGS}")
10-
endif(MPI_COMPILE_FLAGS)
11-
12-
if(MPI_LINK_FLAGS)
13-
set_target_properties(${exec_func_lib} PROPERTIES LINK_FLAGS
14-
"${MPI_LINK_FLAGS}")
15-
endif(MPI_LINK_FLAGS)
16-
target_include_directories(${exec_func_lib} PUBLIC ${MPI_INCLUDE_PATH})
17-
target_link_libraries(${exec_func_lib} PUBLIC ${MPI_LIBRARIES})
7+
target_link_libraries(${exec_func_lib} PUBLIC MPI::MPI_CXX)
188
endfunction()

cmake/sanitizers.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
option(ENABLE_ADDRESS_SANITIZER OFF)
2+
option(ENABLE_UB_SANITIZER OFF)
3+
option(ENABLE_LEAK_SANITIZER OFF)
24
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
35
if(ENABLE_ADDRESS_SANITIZER)
46
add_compile_options(-fsanitize=address)

tasks/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ project(parallel_programming_course LANGUAGES C CXX)
22

33
message(STATUS "Student's tasks")
44

5-
# ——— Testing options ————————————————————————————————————————
6-
option(USE_FUNC_TESTS "Enable functional tests" OFF)
7-
option(USE_PERF_TESTS "Enable performance tests" OFF)
8-
95
# Test runner executables
106
set(FUNC_TEST_EXEC ppc_func_tests)
117
set(PERF_TEST_EXEC ppc_perf_tests)
@@ -18,7 +14,7 @@ ppc_add_test(${FUNC_TEST_EXEC} common/runners/functional.cpp USE_FUNC_TESTS)
1814
ppc_add_test(${PERF_TEST_EXEC} common/runners/performance.cpp USE_PERF_TESTS)
1915

2016
# ——— List of implementations ————————————————————————————————————————
21-
set(IMPLEMENTATIONS all mpi omp seq stl tbb)
17+
set(PPC_IMPLEMENTATIONS "all;mpi;omp;seq;stl;tbb" CACHE STRING "Implementations to build (semicolon-separated)")
2218

2319
# ——— Configure each subproject —————————————————————————————————————
2420
file(

0 commit comments

Comments
 (0)