-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
60 lines (41 loc) · 1.68 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
cmake_minimum_required( VERSION 3.4.3 )
project(parallel_computing)
OPTION ( PAR_COMP_TUTORIAL_ENABLE_PREVIOUS_WEEKS "Build previous weeks' solutions" OFF )
OPTION ( PAR_COMP_TUTORIAL_ENABLE_OMP "Enable OpenMP support" ON )
IF ( ${PAR_COMP_TUTORIAL_ENABLE_OMP} )
add_definitions(-DPAR_COMP_OMP_ENABLED)
ENDIF()
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set (CMAKE_CXX_FLAGS "-std=c++17 -pthread -stdlib=libstdc++ -O3 -march=native ")
IF ( ${PAR_COMP_TUTORIAL_ENABLE_OMP} )
set (CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -fopenmp ")
ENDIF()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "-std=c++17 -pthread -O3 -march=native ")
IF ( ${PAR_COMP_TUTORIAL_ENABLE_OMP} )
set (CMAKE_CXX_FLAGS " ${CMAKE_CXX_FLAGS} -fopenmp ")
ENDIF()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set( CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON )
IF ( ${PAR_COMP_TUTORIAL_ENABLE_OMP} )
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}")
endif()
ENDIF()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set (CMAKE_CXX_FLAGS "-std=c++17 -lpthread -O3 ")
endif()
include_directories(Matrix/inc)
add_subdirectory(Matrix)
IF ( ${PAR_COMP_TUTORIAL_ENABLE_PREVIOUS_WEEKS} )
add_subdirectory(20_11_2019)
add_subdirectory(27_11_2019)
add_subdirectory(04_12_2019)
add_subdirectory(11_12_2019)
add_subdirectory(18_12_2019)
ENDIF()
#add_subdirectory(15_01_2020)
add_subdirectory(22_01_2020)