File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,16 @@ if(TE_BUILD_TEST_RUNNER)
111111 target_compile_options (${CMAKE_PROJECT_NAME} PUBLIC /Zc:__cplusplus /MP /W3 /WX /wd4554
112112 $<$<CONFIG:Debug>:/Od> $<$<CONFIG:Release>:/O2>)
113113 endif ()
114+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU" )
115+ target_compile_options (${CMAKE_PROJECT_NAME} PUBLIC
116+ -Wall -Wextra -Wpedantic -Wshadow -Werror
117+ $<$<CONFIG:Debug>:-O0 -g>
118+ $<$<CONFIG:Release>:-O3>)
119+ if (USE_ADDRESS_SANITIZE)
120+ target_compile_options (${CMAKE_PROJECT_NAME} PUBLIC
121+ -fsanitize=address -fno-omit-frame-pointer)
122+ target_link_options (${CMAKE_PROJECT_NAME} PUBLIC -fsanitize=address)
123+ endif ()
114124 endif ()
115125 target_link_libraries (${CMAKE_PROJECT_NAME} PRIVATE Catch2::Catch2)
116126
You can’t perform that action at this time.
0 commit comments