From e4ce3739f0fc7ba5fb49d1ac3607be01a9abeb14 Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Sat, 21 Dec 2024 22:06:57 -0500 Subject: [PATCH] why? --- .idea/editor.xml | 479 ++++++++++++++++++++++++++++++++++++++++++++++- CMakeLists.txt | 22 +++ 2 files changed, 500 insertions(+), 1 deletion(-) diff --git a/.idea/editor.xml b/.idea/editor.xml index 46540da..b0d69ef 100644 --- a/.idea/editor.xml +++ b/.idea/editor.xml @@ -1,6 +1,483 @@ - \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 7389c4f..1e39106 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,26 @@ cmake_minimum_required(VERSION 3.25) +macro(compile_options target_name) + target_compile_options(${target_name} PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) + target_link_options(${target_name} PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) +endmacro() + +macro(sanitizers target_name) + if (${ENABLE_ADDRSAN} MATCHES ON) + target_compile_options(${target_name} PRIVATE -fsanitize=address) + target_link_options(${target_name} PRIVATE -fsanitize=address) + endif () + + if (${ENABLE_UBSAN} MATCHES ON) + target_compile_options(${target_name} PRIVATE -fsanitize=undefined) + target_link_options(${target_name} PRIVATE -fsanitize=undefined) + endif () + + if (${ENABLE_TSAN} MATCHES ON) + target_compile_options(${target_name} PRIVATE -fsanitize=thread) + target_link_options(${target_name} PRIVATE -fsanitize=thread) + endif () +endmacro() + project(blt-gp VERSION 0.2.1) include(CTest)