소스 검색

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()


불러오는 중...
취소
저장