diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 54793b0..3ce32a1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,14 +34,22 @@ target_compile_options( -Wold-style-cast -Wcast-align -Wno-unused -Wconversion -Wcast-qual -Wctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self - -Wlogical-op -Wmissing-declarations - -Wmissing-include-dirs -Wnoexcept -Woverloaded-virtual - -Wredundant-decls -Wsign-conversion -Wsign-promo - -Wstrict-null-sentinel -Wstrict-overflow=5 -Wswitch-default + -Wmissing-declarations -Wmissing-include-dirs + -Woverloaded-virtual -Wredundant-decls + -Wsign-conversion -Wsign-promo + -Wstrict-overflow=5 -Wswitch-default -Wundef -Werror -pedantic -fsanitize=address -fno-exceptions ) +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") + target_compile_options( + ${PROJECT_NAME} + PRIVATE + -Wlogical-op -Wnoexcept -Wstrict-null-sentinel + ) +endif() + target_include_directories(${PROJECT_NAME} PRIVATE .) target_link_libraries_system(${PROJECT_NAME} ctre fmt) |