File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -906,8 +906,10 @@ function(myci_declare_library name)
906906 )
907907 else ()
908908 target_compile_options (${name} PRIVATE
909- -Wall
910- -Werror
909+ # Enable more warnings only for C++ files.
910+ # We don't care much about C files, as C code is only maintained by 3rd party.
911+ $<$<COMPILE_LANGUAGE :CXX >:-Wall >
912+ $<$<COMPILE_LANGUAGE :CXX >:-Werror >
911913 $<$<COMPILE_LANGUAGE :CXX >:-Wnon -virtual -dtor > # only for C++ files
912914 -fstrict-aliasing
913915 )
@@ -1188,8 +1190,10 @@ function(myci_declare_application name)
11881190 )
11891191 else ()
11901192 target_compile_options (${name} PRIVATE
1191- -Wall
1192- -Werror
1193+ # Enable more warnings only for C++ files.
1194+ # We don't care much about C files, as C code is only maintained by 3rd party.
1195+ $<$<COMPILE_LANGUAGE :CXX >:-Wall >
1196+ $<$<COMPILE_LANGUAGE :CXX >:-Werror >
11931197 $<$<COMPILE_LANGUAGE :CXX >:-Wnon -virtual -dtor > # only for C++ files
11941198 -fstrict-aliasing
11951199 )
You can’t perform that action at this time.
0 commit comments