diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2019-10-03 12:43:00 (GMT) |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2019-10-03 12:43:00 (GMT) |
commit | bc4f8f4472ae94b7053ee373a7406774900f350c (patch) | |
tree | f12601e4150f75d105b7578e4e12eded6b1c4b23 /Modules/Platform | |
parent | 53dedbd51e985ca515b7454520b7c5edd2eaf912 (diff) | |
download | CMake-bc4f8f4472ae94b7053ee373a7406774900f350c.zip CMake-bc4f8f4472ae94b7053ee373a7406774900f350c.tar.gz CMake-bc4f8f4472ae94b7053ee373a7406774900f350c.tar.bz2 |
PCH: Use clang's own pch functionality instead of the GCC emulation
Fixes: #19786
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/Windows-Clang.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Modules/Platform/Windows-Clang.cmake b/Modules/Platform/Windows-Clang.cmake index 84b3a9b..f226553 100644 --- a/Modules/Platform/Windows-Clang.cmake +++ b/Modules/Platform/Windows-Clang.cmake @@ -83,9 +83,10 @@ macro(__windows_compiler_clang_gnu lang) string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG -Xclang -gcodeview ${__ADDED_FLAGS}") set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") - set(CMAKE_PCH_EXTENSION .gch) - set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Winvalid-pch -include <PCH_HEADER>) - set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Winvalid-pch -x ${__pch_header_${lang}} -include <PCH_HEADER>) + set(CMAKE_PCH_EXTENSION .pch) + set(CMAKE_PCH_PROLOGUE "#pragma clang system_header") + set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Xclang -include-pch -Xclang <PCH_FILE>) + set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Xclang -emit-pch -Xclang -include -Xclang <PCH_HEADER>) unset(__ADDED_FLAGS) unset(__ADDED_FLAGS_DEBUG) |