summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmExportFileGenerator.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 2b3ce14..89a8f6c 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -1040,6 +1040,9 @@ void cmExportFileGenerator::GenerateExpectedTargetsCode(std::ostream& os,
" endif()\n"
"endforeach()\n"
"if(\"${_targetsDefined}\" STREQUAL \"${_expectedTargets}\")\n"
+ " unset(_targetsDefined)\n"
+ " unset(_targetsNotDefined)\n"
+ " unset(_expectedTargets)\n"
" set(CMAKE_IMPORT_FILE_VERSION)\n"
" cmake_policy(POP)\n"
" return()\n"