forked from At0mn1yIvan/ppc-2023-mpi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
68 lines (57 loc) · 1.95 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required( VERSION 3.25 )
message( STATUS "Parallel Programming Course" )
include(cmake/configure.cmake)
include(cmake/gtest.cmake)
################################ MPI ################################
option(USE_MPI OFF)
if( USE_MPI )
find_package( MPI )
if( MPI_FOUND )
include_directories( ${MPI_INCLUDE_PATH} )
else( MPI_FOUND )
set( USE_MPI OFF )
endif( MPI_FOUND )
endif( USE_MPI )
############################### OpenMP ##############################
option(USE_OMP OFF)
if( USE_OMP OR USE_SEQ )
find_package( OpenMP )
if( OpenMP_FOUND )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
else( OpenMP_FOUND )
message(FATAL_ERROR "OpenMP NOT FOUND")
endif( OpenMP_FOUND )
endif( USE_OMP OR USE_SEQ )
############################ std::thread ############################
option(USE_STD OFF)
if( USE_STD )
find_package( Threads )
endif( USE_STD )
################################ TBB ################################
option(USE_TBB OFF)
if( USE_TBB )
include(cmake/onetbb.cmake)
endif( USE_TBB )
############################## CPPLINT ##############################
find_package(Python3 REQUIRED)
enable_testing()
if( NOT (APPLE OR WIN32) )
include(cmake/cpplint.cmake)
cpplint_add_subdirectory(tasks)
cpplint_add_subdirectory(modules)
endif( NOT (APPLE OR WIN32) )
######################### Performance mode ##########################
option(USE_PERF_MODE OFF)
if( USE_PERF_MODE )
add_compile_definitions(ENABLE_PERF_MODE)
endif( USE_PERF_MODE )
############################## Modules ##############################
include(cmake/boost.cmake)
include_directories(3rdparty)
include_directories(modules)
include_directories(tasks)
add_subdirectory(modules)
add_subdirectory(tasks)
add_subdirectory(first_samples)