diff options
Diffstat (limited to 'Modules/Compiler/Clang.cmake')
-rw-r--r-- | Modules/Compiler/Clang.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index f7858d7..c43265d 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -106,6 +106,9 @@ else() if (NOT CMAKE_GENERATOR MATCHES "Xcode") set(CMAKE_PCH_PROLOGUE "#pragma clang system_header") endif() + if(CMAKE_${lang}_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0.0 AND NOT __is_apple_clang) + set(CMAKE_${lang}_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates) + endif() set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Xclang -include-pch -Xclang <PCH_FILE> -Xclang -include -Xclang <PCH_HEADER>) set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Xclang -emit-pch -Xclang -include -Xclang <PCH_HEADER> -x ${__pch_header_${lang}}) endmacro() |