-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
35 lines (26 loc) · 892 Bytes
/
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
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR)
project(chess)
add_library(chess INTERFACE)
target_include_directories(chess INTERFACE include)
target_compile_options(chess INTERFACE
-O3
-ggdb3
)
add_executable(example_game examples/random_game.cpp)
target_link_libraries(example_game chess)
add_library(chesstest INTERFACE)
target_include_directories(chesstest INTERFACE test)
add_executable(core_tests test/core.cpp)
target_link_libraries(core_tests chess chesstest)
add_executable(gameplay_tests test/gameplay.cpp)
target_link_libraries(gameplay_tests chess chesstest)
add_executable(misc_tests test/misc.cpp)
target_link_libraries(misc_tests chess chesstest)
add_custom_target(game
DEPENDS example_game
COMMAND ./example_game
)
add_custom_target(tests
DEPENDS core_tests gameplay_tests misc_tests
COMMAND ./core_tests ; ./gameplay_tests ; ./misc_tests
)