-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
67 lines (60 loc) · 1.51 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
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 3.14)
project(Vividmind)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(FetchContent)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt
GIT_TAG 10.2.0
)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest
GIT_TAG v1.15.2
)
FetchContent_MakeAvailable(googletest)
set(COMMON_SOURCES
src/mailbox_board/mailbox_board.cpp
src/mailbox_board/square.cpp
src/mailbox_board/draw.cpp
src/mailbox_board/playmove.cpp
src/mailbox_board/move_gen.cpp
src/bitboards_board/bitboards_board.cpp
src/bitboards_board/bits.cpp
src/bitboards_board/move_gen.cpp
src/bitboards_board/masks.cpp
src/evaluation/evaluation.cpp
src/search/search_defs.cpp
src/search/time_management.cpp
src/search/search.cpp
src/board.cpp
src/piece.cpp
src/fen.cpp
src/move.cpp
src/perft.cpp
src/uci.cpp
src/utils.cpp
)
add_executable(vividmind
src/main.cpp
${COMMON_SOURCES}
)
target_compile_options(vividmind PUBLIC -O3 -march=native -flto)
target_link_options(vividmind PUBLIC -flto)
target_include_directories(vividmind PRIVATE
src/
)
target_link_libraries(vividmind fmt::fmt)
add_executable(tests
tests/tests.cpp
${COMMON_SOURCES}
)
target_include_directories(tests PRIVATE
tests/
src/
)
target_compile_options(tests PUBLIC -g)
target_link_libraries(tests GTest::gtest_main fmt::fmt)