Преглед изворни кода

Merge branch 'kbinani-pch-no-messages' into develop

* kbinani-pch-no-messages:
  disable pch messages when Wno-pch-messages flag exists
master
Sascha Kratky пре 7 година
родитељ
комит
a88f278508
1 измењених фајлова са 20 додато и 4 уклоњено
  1. +20
    -4
      CMake/cotire.cmake

+ 20
- 4
CMake/cotire.cmake Прегледај датотеку

@@ -1662,6 +1662,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")
@@ -1669,13 +1673,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()
@@ -1786,17 +1794,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()


Loading…
Откажи
Сачувај