blob: abe7f40d171333a4a78d76d0de256eea29f8cf25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
include(cotire)
function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
# Use the header for every target
foreach(TARGET_NAME ${TARGET_NAME_LIST})
# Disable unity builds
set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_ADD_UNITY_BUILD OFF)
# Set the prefix header
set_target_properties(${TARGET_NAME} PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT ${PCH_HEADER})
# Workaround for cotire bug: https://github.com/sakra/cotire/issues/138
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 14)
endforeach()
cotire(${TARGET_NAME_LIST})
endfunction(ADD_CXX_PCH)
|