@@ -9,6 +9,22 @@ set(CMAKE_CXX_STANDARD 20)
99set (CMAKE_CXX_STANDARD_REQUIRED ON )
1010# We C++ 20 is required by the main exec
1111
12+ ################################################################################
13+ # Tunable parameters #
14+ ################################################################################
15+
16+ # Uncomment to stop enforcing inline on INLINE macro
17+ #add_compile_definitions(PREVENT_FORCE_INLINE=1)
18+
19+ # Uncomment to add gathering TT statistics
20+ add_compile_definitions (TEST_TT=1)
21+
22+ # Uncomment to add displaying debug info about aspiration window
23+ add_compile_definitions (TEST_ASP_WIN=1)
24+
25+ # Uncomment to allow usage of aspiration windows inside the search
26+ #add_compile_definitions(USE_ASP_WIN=1)
27+
1228################################################################################
1329# Inspecting platform capabilities #
1430################################################################################
@@ -122,6 +138,7 @@ set(CHECKMATE_CHARIOT_SOURCES
122138 include /TestsAndDebugging/TestSetup.h
123139 include /TestsAndDebugging/StateReconstructor.h
124140 include /TestsAndDebugging/DebugTools.h
141+ src/DebugTools.cpp
125142)
126143
127144# Create a library with the core functionality
@@ -142,6 +159,8 @@ add_executable(Checkmate-Chariot-Tests
142159 tests/Logger.cc
143160 tests/UCITranslator.cc
144161 tests/BoardEvaluator.cc
162+ tests/ChessMechanics.cc
163+ tests/SearchTests.cc
145164)
146165target_link_libraries (
147166 Checkmate-Chariot-Tests PRIVATE Checkmate-Core GTest::gtest_main)
@@ -174,9 +193,9 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
174193elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
175194
176195 if (CMAKE_BUILD_TYPE STREQUAL "Debug" )
177- target_compile_options (Checkmate-Core PUBLIC -fconstexpr-ops-limit=133554432;-g;-fopenmp)
196+ target_compile_options (Checkmate-Core PUBLIC -fconstexpr-ops-limit=133554432;-g;-fopenmp;-O0 )
178197 elseif (CMAKE_BUILD_TYPE STREQUAL "Release" )
179- target_compile_options (Checkmate-Core PUBLIC -O3;-march=native;-fopenmp;-fconstexpr-ops-limit=1335544322 ;-funroll-loops;-fno-peel-loops;-fno-tracer)
198+ target_compile_options (Checkmate-Core PUBLIC -O3;-march=native;-fopenmp;-fconstexpr-ops-limit=1335544322 ;-funroll-loops;-fno-peel-loops;-fno-tracer; )
180199 elseif (CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
181200 target_compile_options (Checkmate-Core PUBLIC -g;-fconstexpr-ops-limit=133554432;-fopenmp;-O2;-march=native;-fopenmp)
182201 else ()
@@ -201,15 +220,6 @@ else()
201220 message (FATAL_ERROR "Unknown compiler" )
202221endif ()
203222
204- # Uncomment to add gathering TT statistics
205- add_compile_definitions (TEST_TT=1)
206-
207- # Uncomment to add displaying debug info about aspiration window
208- add_compile_definitions (TEST_ASP_WIN=1)
209-
210- # Uncomment to allow usage of aspiration windows inside the search
211- #add_compile_definitions(USE_ASP_WIN=1)
212-
213223################################################################################
214224# Post build #
215225################################################################################
0 commit comments