aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt22
1 files changed, 17 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e8858ca..3f5a42f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,9 +15,21 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES})
target_include_directories(${PROJECT_NAME} PRIVATE src)
-include(CTest)
-if(BUILD_TESTING)
- add_executable(pawn_moves_test tests/pawn_moves_test.cpp src/board.cpp src/moves.cpp)
- target_include_directories(pawn_moves_test PRIVATE src)
- add_test(NAME pawn_moves COMMAND pawn_moves_test)
+if (MSVC)
+ target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX)
+else()
+ target_compile_options(${PROJECT_NAME} PRIVATE
+ -Wall
+ -Wextra
+ -Wpedantic
+ -Werror
+ )
endif()
+
+target_compile_options(${PROJECT_NAME} PRIVATE
+ -fsanitize=address,undefined
+)
+
+target_link_options(${PROJECT_NAME} PRIVATE
+ -fsanitize=address,undefined
+)