8.2.2 : The CMakeLists.txt

The CMakeLists.txt file :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
project(Reduction)
cmake_minimum_required(VERSION 3.0)

add_executable(reduction_O0 main.cpp)
set_property(TARGET reduction_O0 PROPERTY COMPILE_FLAGS "-O0")
target_link_libraries(reduction_O0 asterics_hpc)
runExample(reduction_O0)

add_executable(reduction_O1 main.cpp)
set_property(TARGET reduction_O1 PROPERTY COMPILE_FLAGS "-O1")
target_link_libraries(reduction_O1 asterics_hpc)
runExample(reduction_O1)

add_executable(reduction_O2 main.cpp)
set_property(TARGET reduction_O2 PROPERTY COMPILE_FLAGS "-O2")
target_link_libraries(reduction_O2 asterics_hpc)
runExample(reduction_O2)

add_executable(reduction_O3 main.cpp)
set_property(TARGET reduction_O3 PROPERTY COMPILE_FLAGS "-O3")
target_link_libraries(reduction_O3 asterics_hpc)
runExample(reduction_O3)

plotPerf("reductionBase" reduction_O0 reduction_O1 reduction_O2 reduction_O3)