diff options
author | Brad King <brad.king@kitware.com> | 2020-06-02 12:24:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-06-02 12:24:11 (GMT) |
commit | e76c11aa7c68abdfe60d1ad9c3df05ea06ef1755 (patch) | |
tree | 95e767212ec65177380059dcd3622adc004c1358 /Modules/Compiler/GNU.cmake | |
parent | a432b1075c8808c6e4c925d3f4d4ce94c5477bab (diff) | |
parent | 10c88c433766cb9b4d3e6f95a96788559ff4136f (diff) | |
download | CMake-e76c11aa7c68abdfe60d1ad9c3df05ea06ef1755.zip CMake-e76c11aa7c68abdfe60d1ad9c3df05ea06ef1755.tar.gz CMake-e76c11aa7c68abdfe60d1ad9c3df05ea06ef1755.tar.bz2 |
Merge branch 'backport-3.17-pch-no-Fortran' into pch-no-Fortran
Diffstat (limited to 'Modules/Compiler/GNU.cmake')
-rw-r--r-- | Modules/Compiler/GNU.cmake | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake index df6d6b8..668a6a9 100644 --- a/Modules/Compiler/GNU.cmake +++ b/Modules/Compiler/GNU.cmake @@ -111,11 +111,13 @@ macro(__compiler_gnu lang) endif() list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp") - set(CMAKE_PCH_EXTENSION .gch) - if (NOT CMAKE_GENERATOR MATCHES "Xcode") - set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header") + if(NOT "x${lang}" STREQUAL "xFortran") + set(CMAKE_PCH_EXTENSION .gch) + if (NOT CMAKE_GENERATOR MATCHES "Xcode") + set(CMAKE_PCH_PROLOGUE "#pragma GCC system_header") + endif() + set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) + set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>) + set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>) endif() - set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch) - set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -include <PCH_HEADER>) - set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -x ${__pch_header_${lang}} -include <PCH_HEADER>) endmacro() |