Skip to content

Commit da4bcad

Browse files
committed
Build: Remove -fpch-instantiate-templates detection, it is enabled by default since CMake 3.19
(cherry picked from commit 55a19f15d01b5f06c158f1dfbd2c43e4f5d6837c)
1 parent dce2b90 commit da4bcad

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmake/compiler/clang/settings.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang")
33
# apple doesnt like to do the sane thing which would be to use the same version numbering as regular clang
44
# version number pulled from https://en.wikipedia.org/wiki/Xcode#Toolchain_versions for row matching LLVM 11
55
set(CLANG_EXPECTED_VERSION 12.0.5)
6+
# enable -fpch-instantiate-templates for AppleClang (by default it is active only for regular clang)
7+
set(CMAKE_C_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
8+
set(CMAKE_CXX_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
69
endif()
710

811
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS CLANG_EXPECTED_VERSION)

0 commit comments

Comments
 (0)