mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 21:36:13 +01:00
Do not pass C++ warning options to C compiler
This commit is contained in:
1 parent
5ccbbdf61b
commit
0601d5fa8d
1 file changed
+3
-3
@@ -39,17 +39,17 @@ function(set_file_warnings)
|
|||||||
set(CLANG_AND_GCC_WARNINGS
|
set(CLANG_AND_GCC_WARNINGS
|
||||||
-Wall
|
-Wall
|
||||||
-Wextra # reasonable and standard
|
-Wextra # reasonable and standard
|
||||||
-Wnon-virtual-dtor # warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors
|
$<$<COMPILE_LANGUAGE:CXX>:-Wnon-virtual-dtor> # warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors
|
||||||
-Wcast-align # warn for potential performance problem casts
|
-Wcast-align # warn for potential performance problem casts
|
||||||
-Wunused # warn on anything being unused
|
-Wunused # warn on anything being unused
|
||||||
-Woverloaded-virtual # warn if you overload (not override) a virtual function
|
$<$<COMPILE_LANGUAGE:CXX>:-Woverloaded-virtual> # warn if you overload (not override) a virtual function
|
||||||
-Wconversion # warn on type conversions that may lose data
|
-Wconversion # warn on type conversions that may lose data
|
||||||
-Wsign-conversion # warn on sign conversions
|
-Wsign-conversion # warn on sign conversions
|
||||||
-Wdouble-promotion # warn if float is implicit promoted to double
|
-Wdouble-promotion # warn if float is implicit promoted to double
|
||||||
-Wformat=2 # warn on security issues around functions that format output (ie printf)
|
-Wformat=2 # warn on security issues around functions that format output (ie printf)
|
||||||
# -Wimplicit-fallthrough # warn when a missing break causes control flow to continue at the next case in a switch statement (disabled until better compiler support for explicit fallthrough is available)
|
# -Wimplicit-fallthrough # warn when a missing break causes control flow to continue at the next case in a switch statement (disabled until better compiler support for explicit fallthrough is available)
|
||||||
-Wnull-dereference # warn if a null dereference is detected
|
-Wnull-dereference # warn if a null dereference is detected
|
||||||
-Wold-style-cast # warn for c-style casts
|
$<$<COMPILE_LANGUAGE:CXX>:-Wold-style-cast> # warn for c-style casts
|
||||||
-Wpedantic # warn if non-standard C++ is used
|
-Wpedantic # warn if non-standard C++ is used
|
||||||
-Wno-deprecated-declarations # do not warning about deprecated declarations
|
-Wno-deprecated-declarations # do not warning about deprecated declarations
|
||||||
-Wno-language-extension-token # ignore use of __int64 compiler extension
|
-Wno-language-extension-token # ignore use of __int64 compiler extension
|
||||||
|
|||||||
Reference in new issue
Block a user