File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -899,8 +899,8 @@ function(myci_declare_library name)
899899 # enable sane warnings and other compiler options
900900 if (MSVC )
901901 target_compile_options (${name} PRIVATE
902- /W4
903- /WX # warnings = errors
902+ $<$< COMPILE_LANGUAGE : CXX >: /W4 >
903+ $<$< COMPILE_LANGUAGE : CXX >: /WX > # warnings = errors
904904 # /W4 includes check for non-virtual-destructor.
905905 # There is no equivalent for -fstring-aliasing, as MSVS generally assumes a more conservative aliasing model by default.
906906
@@ -1186,8 +1186,8 @@ function(myci_declare_application name)
11861186 # enable sane warnings and other compiler options
11871187 if (MSVC )
11881188 target_compile_options (${name} PRIVATE
1189- /W4
1190- /WX # warnings = errors
1189+ $<$< COMPILE_LANGUAGE : CXX >: /W4 >
1190+ $<$< COMPILE_LANGUAGE : CXX >: /WX > # warnings = errors
11911191 # /W4 includes check for non-virtual-destructor.
11921192 # There is no equivalent for -fstring-aliasing, as MSVS generally assumes a more conservative aliasing model by default.
11931193
You can’t perform that action at this time.
0 commit comments