Explorar el Código

Merge branch 'pch-no-messages' of https://github.com/kbinani/cotire into kbinani-pch-no-messages

master
Sascha Kratky hace 7 años
padre
commit
5ef1b075d3
Se han modificado 1 ficheros con 20 adiciones y 4 borrados
  1. +20
    -4
      CMake/cotire.cmake

+ 20
- 4
CMake/cotire.cmake Ver fichero

@@ -1657,6 +1657,10 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
get_filename_component(_pchName "${_pchFile}" NAME)
set (_xLanguage_C "c-header")
set (_xLanguage_CXX "c++-header")
set (_pchSuppressMessages FALSE)
if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*")
set(_pchSuppressMessages TRUE)
endif()
if (_flags)
# append to list
if ("${_language}" STREQUAL "CXX")
@@ -1664,13 +1668,17 @@ function (cotire_add_pch_compilation_flags _language _compilerID _compilerVersio
endif()
list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-create" "${_pchName}" "-fsyntax-only" "${_hostFile}")
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
list (APPEND _flags "-Wpch-messages")
if (NOT _pchSuppressMessages)
list (APPEND _flags "-Wpch-messages")
endif()
endif()
else()
# return as a flag string
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-create \"${_pchName}\"")
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
set (_flags "${_flags} -Wpch-messages")
if (NOT _pchSuppressMessages)
set (_flags "${_flags} -Wpch-messages")
endif()
endif()
endif()
endif()
@@ -1781,17 +1789,25 @@ function (cotire_add_prefix_pch_inclusion_flags _language _compilerID _compilerV
if (_pchFile)
get_filename_component(_pchDir "${_pchFile}" DIRECTORY)
get_filename_component(_pchName "${_pchFile}" NAME)
set (_pchSuppressMessages FALSE)
if ("${CMAKE_${_language}_FLAGS}" MATCHES ".*-Wno-pch-messages.*")
set(_pchSuppressMessages TRUE)
endif()
if (_flags)
# append to list
list (APPEND _flags "-include" "${_prefixFile}" "-pch-dir" "${_pchDir}" "-pch-use" "${_pchName}")
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
list (APPEND _flags "-Wpch-messages")
if (NOT _pchSuppressMessages)
list (APPEND _flags "-Wpch-messages")
endif()
endif()
else()
# return as a flag string
set (_flags "-include \"${_prefixFile}\" -pch-dir \"${_pchDir}\" -pch-use \"${_pchName}\"")
if (NOT "${_compilerVersion}" VERSION_LESS "13.1.0")
set (_flags "${_flags} -Wpch-messages")
if (NOT _pchSuppressMessages)
set (_flags "${_flags} -Wpch-messages")
endif()
endif()
endif()
else()


Cargando…
Cancelar
Guardar