|
|
|
@@ -2731,6 +2731,20 @@ function (cotire_collect_unity_target_sources _target _languages _unityTargetSou |
|
|
|
set (${_unityTargetSourcesVar} ${_unityTargetSources} PARENT_SCOPE) |
|
|
|
endfunction() |
|
|
|
|
|
|
|
function (cotire_setup_unity_target_pch_usage _languages _target) |
|
|
|
foreach (_language ${_languages}) |
|
|
|
get_property(_unityFiles TARGET ${_target} PROPERTY COTIRE_${_language}_UNITY_SOURCE) |
|
|
|
if (_unityFiles) |
|
|
|
get_property(_userPrefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER_INIT) |
|
|
|
get_property(_prefixFile TARGET ${_target} PROPERTY COTIRE_${_language}_PREFIX_HEADER) |
|
|
|
if (_userPrefixFile AND _prefixFile) |
|
|
|
# user provided prefix header must be included unconditionally by unity sources |
|
|
|
cotire_setup_prefix_file_inclusion(${_language} ${_target} "${_prefixFile}" ${_unityFiles}) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
endforeach() |
|
|
|
endfunction() |
|
|
|
|
|
|
|
function (cotire_setup_unity_build_target _languages _configurations _target) |
|
|
|
get_target_property(_unityTargetName ${_target} COTIRE_UNITY_TARGET_NAME) |
|
|
|
if (NOT _unityTargetName) |
|
|
|
@@ -2956,6 +2970,9 @@ function (cotire_target _target) |
|
|
|
if (_targetUsePCH) |
|
|
|
cotire_setup_target_pch_usage("${_targetLanguages}" ${_target} ${_wholeTarget} ${_cmds}) |
|
|
|
cotire_setup_pch_target("${_targetLanguages}" "${_option_CONFIGURATIONS}" ${_target}) |
|
|
|
if (_targetAddSCU) |
|
|
|
cotire_setup_unity_target_pch_usage("${_targetLanguages}" ${_target}) |
|
|
|
endif() |
|
|
|
endif() |
|
|
|
get_target_property(_targetAddCleanTarget ${_target} COTIRE_ADD_CLEAN) |
|
|
|
if (_targetAddCleanTarget) |
|
|
|
|