Skip to content

Commit 7d4d48a

Browse files
authored
Update CMakeLists.txt
1 parent d0aa0b8 commit 7d4d48a

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,28 @@ FetchContent_Declare(
1717
GIT_TAG main
1818
)
1919
set(BUILD_GAVIOTA OFF CACHE BOOL "Enable Gaviota TB probing" FORCE)
20+
option(ENGINE_TUNING "enable Texel tuning (requires csv-parser)" OFF)
2021
FetchContent_MakeAvailable(chesslib tbprobe)
21-
add_executable(engine "main.cpp" "timeman.cpp" "timeman.h" "eval.h" "eval.cpp" "tune.h" "ucioption.h" "tune.cpp" "ucioption.cpp" "tt.h" "tt.cpp" "uci.cpp" "uci.h" "search.h" "search.cpp" "score.h" "score.cpp" "movepick.h" "movepick.cpp" "tb.h" "tb.cpp" "Weights.h" "tune_cmd.h" "tune_cmd.cpp")
22+
set(SOURCES
23+
"main.cpp"
24+
"timeman.cpp"
25+
"eval.cpp"
26+
"tune.cpp"
27+
"ucioption.cpp"
28+
"tt.cpp"
29+
"uci.cpp"
30+
"search.cpp"
31+
"score.cpp"
32+
"movepick.cpp"
33+
"tb.cpp"
34+
)
35+
36+
if(ENGINE_TUNING)
37+
list(APPEND SOURCES "tune_cmd.cpp")
38+
endif()
39+
40+
add_executable(engine ${SOURCES})
41+
2242
target_link_libraries(engine PRIVATE chesslib syzygy_probe)
2343
target_include_directories(engine PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${chesslib_SOURCE_DIR})
2444
execute_process(
@@ -46,7 +66,6 @@ endif()
4666

4767
message(STATUS "Build Version: ${BUILD_VERSION}")
4868
target_compile_definitions(engine PRIVATE BUILD_VERSION="${BUILD_VERSION}")
49-
option(ENGINE_TUNING "enable Texel tuning (requires csv-parser)" OFF)
5069
if (ENGINE_TUNING)
5170
FetchContent_Declare(
5271
csv

0 commit comments

Comments
 (0)