Skip to content
Snippets Groups Projects
Commit f45c16e7 authored by Matthew Woehlke's avatar Matthew Woehlke
Browse files

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.
parent 8d7ef6a8
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment