File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ macro(configure_tests target)
4242 )
4343
4444 # Add warnings
45- if (NOT MSVC )
45+ if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU" )
4646 target_compile_options (${target} PRIVATE
4747 -Wall -Wextra -Wcast-align -Wmissing-declarations -Wmissing-include -dirs
4848 -Wnon-virtual-dtor -Wodr -Wpedantic -Wredundant-decls -Wundef -Wunreachable-code
@@ -51,10 +51,12 @@ macro(configure_tests target)
5151 endif ()
5252
5353 # Configure optimization options
54- target_compile_options (${target} PRIVATE
55- $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>>:-O0>
56- $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>>:-Og>
57- )
54+ if (CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "GNU" )
55+ target_compile_options (${target} PRIVATE
56+ $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:Clang>>:-O0>
57+ $<$<AND :$<CONFIG:Debug>,$<CXX_COMPILER_ID:GNU>>:-Og>
58+ )
59+ endif ()
5860
5961 # Use lld or the gold linker if possible
6062 if (UNIX AND NOT APPLE )
You can’t perform that action at this time.
0 commit comments