Browse Source

Merge topic 'automoc-predefs'

ccef69bde4 AUTOMOC: Avoid compiler warnings while computing predefines

Acked-by: Kitware Robot <[email protected]>
Acked-by: buildbot <[email protected]>
Merge-request: !10702
Brad King 7 months ago
parent
commit
0bc051c180

+ 1 - 1
Modules/Compiler/GNU.cmake

@@ -135,7 +135,7 @@ macro(__compiler_gnu lang)
       list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
       unset(_COMPILER_ARGS)
     endif()
-    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-w" "-dM" "-E" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
   endif()
 
   if(NOT "x${lang}" STREQUAL "xFortran")

+ 1 - 1
Modules/Compiler/IBMClang.cmake

@@ -27,6 +27,6 @@ macro(__compiler_ibmclang lang)
   endif()
 
   if("${lang}" STREQUAL "CXX")
-    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-w" "-dM" "-E" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
   endif()
 endmacro()

+ 1 - 1
Modules/Compiler/Intel.cmake

@@ -42,7 +42,7 @@ else()
         list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
         unset(_COMPILER_ARGS)
       endif()
-      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-w" "-QdM" "-P" "-Za" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
     endif()
 
     if("x${lang}" STREQUAL "xFortran")

+ 1 - 1
Modules/Compiler/IntelLLVM.cmake

@@ -104,7 +104,7 @@ else()
         list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
         unset(_COMPILER_ARGS)
       endif()
-      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-w" "-dM" "-E" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
       if(CMAKE_${lang}_COMPILER_TARGET)
         list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
       endif()

+ 1 - 1
Modules/Compiler/LCC.cmake

@@ -85,7 +85,7 @@ macro(__compiler_lcc lang)
       list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
       unset(_COMPILER_ARGS)
     endif()
-    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-w" "-dM" "-E" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
   endif()
 
   if(NOT "x${lang}" STREQUAL "xFortran")