summaryrefslogtreecommitdiffstats
path: root/Source/cmExportFileGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-04-20 18:06:52 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2022-04-20 19:36:20 (GMT)
commitc2194176db8248d63e8e8b77740bf9a1285f3680 (patch)
tree522c6529119e6ef831882e9dfe5ab8f2ec38baae /Source/cmExportFileGenerator.cxx
parent233997a914af8341527eddd83a09fcc0f383ec65 (diff)
downloadCMake-c2194176db8248d63e8e8b77740bf9a1285f3680.zip
CMake-c2194176db8248d63e8e8b77740bf9a1285f3680.tar.gz
CMake-c2194176db8248d63e8e8b77740bf9a1285f3680.tar.bz2
generated-scripts: unset used variables
Diffstat (limited to 'Source/cmExportFileGenerator.cxx')
-rw-r--r--Source/cmExportFileGenerator.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index d13253a..3661f07 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -996,11 +996,12 @@ void cmExportFileGenerator::GenerateExpectedTargetsCode(
" list(APPEND _cmake_targets_not_defined \"${_cmake_expected_target}\")\n"
" endif()\n"
"endforeach()\n"
+ "unset(_cmake_expected_target)\n"
"if(_cmake_targets_defined STREQUAL _cmake_expected_targets)\n"
" unset(_cmake_targets_defined)\n"
" unset(_cmake_targets_not_defined)\n"
" unset(_cmake_expected_targets)\n"
- " set(CMAKE_IMPORT_FILE_VERSION)\n"
+ " unset(CMAKE_IMPORT_FILE_VERSION)\n"
" cmake_policy(POP)\n"
" return()\n"
"endif()\n"
@@ -1192,8 +1193,10 @@ void cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os)
"\")\n"
" endif()\n"
" endforeach()\n"
+ " unset(_cmake_file)\n"
" unset(\"_cmake_import_check_files_for_${_cmake_target}\")\n"
"endforeach()\n"
+ "unset(_cmake_target)\n"
"unset(_cmake_import_check_targets)\n"
"\n";
/* clang-format on */