diff options
author | Matthew Woehlke <matthew.woehlke@kitware.com> | 2016-05-05 15:33:56 (GMT) |
---|---|---|
committer | Matthew Woehlke <matthew.woehlke@kitware.com> | 2016-05-05 15:33:56 (GMT) |
commit | f45c16e7ee562f9918b75134b54b92661c5a98c8 (patch) | |
tree | 150004236fb431ee7f8c0b37963a4eb08645fe94 /Source | |
parent | 8d7ef6a8b02f2fca4ccb9aaad71ca0d2235ce8a6 (diff) | |
download | CMake-f45c16e7ee562f9918b75134b54b92661c5a98c8.zip CMake-f45c16e7ee562f9918b75134b54b92661c5a98c8.tar.gz CMake-f45c16e7ee562f9918b75134b54b92661c5a98c8.tar.bz2 |
Fix export file variable pollution
Add missing unset of scratch variables to generated export file for case
that the file was already included. We already unset these when parsing
the file normally, but the multiple inclusion case was leaving them
around.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 3 |
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" |