CMake: correct remove_strict_cxx_flags_file
authorCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jun 2018 05:30:00 +0000 (07:30 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 25 Jun 2018 05:30:00 +0000 (07:30 +0200)
Was still using C-flags.

build_files/cmake/macros.cmake

index d265b8ffad28892852abf65aee2d32157b90810b..5d5425a9fc6df012d8da7202e670170581473e11 100644 (file)
@@ -1124,7 +1124,7 @@ macro(remove_strict_c_flags_file
        filenames)
        foreach(_SOURCE ${ARGV})
                if(CMAKE_COMPILER_IS_GNUCC OR
-                 (CMAKE_C_COMPILER_ID MATCHES "Clang"))
+                  (CMAKE_C_COMPILER_ID MATCHES "Clang"))
                        set_source_files_properties(${_SOURCE}
                                PROPERTIES
                                        COMPILE_FLAGS "${C_REMOVE_STRICT_FLAGS}"
@@ -1142,10 +1142,10 @@ macro(remove_strict_cxx_flags_file
        remove_strict_c_flags_file(${filenames} ${ARHV})
        foreach(_SOURCE ${ARGV})
                if(CMAKE_COMPILER_IS_GNUCC OR
-                 (CMAKE_C_COMPILER_ID MATCHES "Clang"))
+                  (CMAKE_CXX_COMPILER_ID MATCHES "Clang"))
                        set_source_files_properties(${_SOURCE}
                                PROPERTIES
-                                       COMPILE_FLAGS "${C_REMOVE_STRICT_FLAGS}"
+                                       COMPILE_FLAGS "${CXX_REMOVE_STRICT_FLAGS}"
                        )
                endif()
                if(MSVC)