summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/GNU.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-02 12:24:11 (GMT)
committerBrad King <brad.king@kitware.com>2020-06-02 12:24:11 (GMT)
commite76c11aa7c68abdfe60d1ad9c3df05ea06ef1755 (patch)
tree95e767212ec65177380059dcd3622adc004c1358 /Modules/Compiler/GNU.cmake
parenta432b1075c8808c6e4c925d3f4d4ce94c5477bab (diff)
parent10c88c433766cb9b4d3e6f95a96788559ff4136f (diff)
downloadCMake-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.cmake14
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()