-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
58 lines (51 loc) · 1.63 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
58
cmake_minimum_required(VERSION 3.27)
project(pk1_pruefung)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
enable_testing()
add_executable(pk1_pruefung engine/main.cpp
engine/board.cpp
engine/board.h
engine/movement/move_gen.cpp
engine/movement/move_gen.h
engine/misc/move.h
engine/misc/piece.h
engine/chess_bot.cpp
engine/chess_bot.h
engine/misc/board_settings.h
engine/chess_game.cpp
engine/chess_game.h
engine/misc/player.h
engine/exceptions/fen_exception.h
engine/exceptions/board_exception.h
engine/misc/zobrist.h
)
include(FetchContent)
FetchContent_Declare(
googletest
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
# Add your test source file
add_executable(tests tests/tests.cpp
engine/board.cpp
engine/board.h
engine/movement/move_gen.cpp
engine/movement/move_gen.h
engine/misc/move.h
engine/misc/piece.h
engine/chess_bot.cpp
engine/chess_bot.h
engine/misc/board_settings.h
engine/chess_game.cpp
engine/chess_game.h
engine/misc/player.h
engine/exceptions/fen_exception.h
engine/exceptions/board_exception.h
)
# Link the Google libraries to your test executable
target_link_libraries(tests GTest::gtest_main)
include(GoogleTest)
gtest_discover_tests(tests)