forked from srselivan/par_pro_2023_omp_tbb_std
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (48 loc) · 1.67 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
cmake_minimum_required( VERSION 3.12 )
message( STATUS "Parallel Programming Course" )
include(cmake/configure.cmake)
include(cmake/gtest.cmake)
################################ MPI ################################
# option(USE_MPI OFF)
# if( USE_MPI )
# include(cmake/boost.cmake)
# find_package( MPI )
# if( MPI_FOUND )
# include_directories( ${MPI_INCLUDE_PATH} )
# else( MPI_FOUND )
# set( USE_MPI OFF )
# endif( MPI_FOUND )
# endif( USE_MPI )
set(USE_MPI OFF)
############################### 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(modules)
endif( NOT (APPLE OR WIN32) )
############################## Modules ##############################
include_directories(3rdparty/unapproved)
add_subdirectory(modules)