From 9f34ff37c95ef88cd12e4d4fe462136782191d3d Mon Sep 17 00:00:00 2001 From: Sascha Kratky Date: Sat, 10 Oct 2015 13:21:03 +0200 Subject: [PATCH] omit COTIRE_*_INIT variables from generated target script --- CMake/cotire.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CMake/cotire.cmake b/CMake/cotire.cmake index 062e478..c76494f 100644 --- a/CMake/cotire.cmake +++ b/CMake/cotire.cmake @@ -2019,7 +2019,12 @@ function (cotire_generate_target_script _language _configurations _target _targe # copy variable definitions to cotire target script get_cmake_property(_vars VARIABLES) string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+" _matchVars "${_vars}") - # remove COTIRE_VERBOSE which is passed as a CMake define on command line + # omit COTIRE_*_INIT variables + string (REGEX MATCHALL "COTIRE_[A-Za-z0-9_]+_INIT" _initVars "${_matchVars}") + if (_initVars) + list (REMOVE_ITEM _matchVars ${_initVars}) + endif() + # omit COTIRE_VERBOSE which is passed as a CMake define on command line list (REMOVE_ITEM _matchVars COTIRE_VERBOSE) set (_contents "") set (_contentsHasGeneratorExpressions FALSE)