aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-07-26 19:59:56 +0200
committerAdam <adammegarules1@gmail.com>2026-07-26 19:59:56 +0200
commit94cc9240eabf78cbbc9006cb70ca74b6bc3f54e6 (patch)
tree09829afd7836f3aa4dfe62b9e699e0bd493ff9a3
parent5686b9b6fe63c8c1874cc891bbf1db02bb45868b (diff)
readme + cmake upgrades
-rw-r--r--CMakeLists.txt15
-rw-r--r--README.md7
2 files changed, 16 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec93cc0..a970f50 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,10 +26,13 @@ else()
)
endif()
-target_compile_options(${PROJECT_NAME} PRIVATE
- -fsanitize=address,undefined
-)
+if (NOT MSVC AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+ target_compile_options(${PROJECT_NAME} PRIVATE
+ -fsanitize=address,undefined
+ -fno-omit-frame-pointer
+ )
-target_link_options(${PROJECT_NAME} PRIVATE
- -fsanitize=address,undefined
-)
+ target_link_options(${PROJECT_NAME} PRIVATE
+ -fsanitize=address,undefined
+ )
+endif()
diff --git a/README.md b/README.md
index 924fc4e..ab8ff5f 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,15 @@
```bash
cmake -B build -S . # Run only on cmake config changes (and first time)
+# Or for development
+cmake -B build -S . -DCMAKE_BUILD_TYPE=Debug
cmake --build ./build # Build
./build/chess # Run the app
```
+
+## Details
+
+- (AddressSanitizer)[https://github.com/google/sanitizers/wiki/AddressSanitizer] (aka ASan)
+- (UndefinedBehaviorSanitizer¶)[https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html] (aka UBSan)