diff --git a/CMLibCommon.cmake b/CMLibCommon.cmake index 3800d79..558f0b2 100644 --- a/CMLibCommon.cmake +++ b/CMLibCommon.cmake @@ -27,6 +27,7 @@ include(CMLibCompilerFlags) include(CMLibDistCC) include(CMLibCompilerFeaturesHPPGenerate) include(CMLibFlagRemove) +include(CMLibCotire) include(CMLibBuildTypes) include(CMLibCommonTargetProperties) include(CMLibCommonLibraryTarget) @@ -36,7 +37,6 @@ include(CMLibCodeAnalysisClangTidy) include(CMLibCodeAnalysisClazy) include(CMLibCodeCoverage) include(CMLibSanitizers) -include(cotire) include(CMLibFormatSources) include(CMLibDocDoxygen) diff --git a/CMLibCommonTargetProperties.cmake b/CMLibCommonTargetProperties.cmake index 02d3f76..24a38fe 100644 --- a/CMLibCommonTargetProperties.cmake +++ b/CMLibCommonTargetProperties.cmake @@ -69,6 +69,9 @@ function(common_target_properties target) endif() endif() + set_target_properties(${target} PROPERTIES COTIRE_ENABLE_PRECOMPILED_HEADER ${CMLIB_COTIRE_ENABLE_PRECOMPILED_HEADER}) + set_target_properties(${target} PROPERTIES COTIRE_ADD_UNITY_BUILD ${CMLIB_COTIRE_ADD_UNITY_BUILD}) + if(CMAKE_BUILD_TYPE STREQUAL Profile) target_compile_definitions(${target} ${__visibility} PROFILE) elseif(CMAKE_BUILD_TYPE STREQUAL Debug)