-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
52 lines (33 loc) · 1.06 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
project(gravity_simulator)
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_STANDARD 17)
include(FeatureSummary)
option(BUILD_TESTS "Build unit tests" OFF)
add_feature_info("Build tests" BUILD_TESTS "Enables build of tests. Feature controled by BUILD_TESTS variable.")
if(BUILD_TESTS)
enable_testing()
endif()
add_subdirectory(src)
#add_subdirectory(gravity)
if(UNIX)
find_program(OBJ_DUMP objdump)
if(OBJ_DUMP)
add_custom_command(OUTPUT gravity_simulator.lst
COMMAND ${OBJ_DUMP} -M intel -d $<TARGET_FILE:gravity_simulator> > gravity_simulator.lst
DEPENDS gravity_simulator
)
add_custom_target(assembly_listing ALL
DEPENDS gravity_simulator.lst
)
endif()
endif()
feature_summary(WHAT ALL)
#unit tests
if(BUILD_TESTS)
add_custom_target(RunUnitTests ALL
COMMAND ctest
DEPENDS accelerators_tests
)
endif()