Changeset - r24304:fcbe4a05932b
[Not reviewed]
master
0 1 0
Dan Villiom Podlaski Christiansen - 4 years ago 2020-06-04 18:44:57
danchr@gmail.com
Fix: use proper flags for suppressing warnings in Clang
1 file changed with 15 insertions and 8 deletions:
0 comments (0 inline, 0 general)
cmake/CompileFlags.cmake
Show inline comments
 
@@ -73,14 +73,21 @@ macro(compile_flags)
 
            -fno-strict-aliasing
 
        )
 

	
 
        add_compile_options(
 
            # When we are a stable release (Release build + USE_ASSERTS not set),
 
            # assertations are off, which trigger a lot of warnings. We disable
 
            # these warnings for these releases.
 
            "$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
 
            "$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>"
 
            "$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>"
 
        )
 
        # When we are a stable release (Release build + USE_ASSERTS not set),
 
        # assertations are off, which trigger a lot of warnings. We disable
 
        # these warnings for these releases.
 
        if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 
            add_compile_options(
 
                "$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
 
                "$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-parameter>"
 
                "$<${IS_STABLE_RELEASE}:-Wno-unused-but-set-variable>"
 
            )
 
        else (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 
            add_compile_options(
 
                "$<${IS_STABLE_RELEASE}:-Wno-unused-variable>"
 
                "$<${IS_STABLE_RELEASE}:-Wno-unused-parameter>"
 
            )
 
        endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 

	
 
        # Ninja processes the output so the output from the compiler
 
        # isn't directly to a terminal; hence, the default is
0 comments (0 inline, 0 general)