mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 22:58:37 -05:00
8c8f03422e
Adds PCH_INSTANTIATE_TEMPLATES target property for enabling template instantiation in precompiled headers. Enabled by default. Currently only supported for Clang 11 and newer. Implements #21133.
17 lines
308 B
CMake
17 lines
308 B
CMake
enable_language(C)
|
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
add_library(empty empty.c)
|
|
target_precompile_headers(empty PUBLIC
|
|
<stdio.h>
|
|
<string.h>
|
|
)
|
|
|
|
add_library(foo foo.c)
|
|
target_precompile_headers(foo PUBLIC
|
|
<stdio.h>
|
|
<string.h>
|
|
)
|
|
set_target_properties(foo PROPERTIES PCH_INSTANTIATE_TEMPLATES OFF)
|