From 2ec44be41e1359e6df07edcc86d0934042cd2ef3 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 20 Apr 2022 14:05:07 -0400 Subject: generated-scripts: quote variable expansions --- Source/cmExportFileGenerator.cxx | 8 ++++---- Source/cmExportInstallFileGenerator.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 97a6088..7aa35d3 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -989,11 +989,11 @@ void cmExportFileGenerator::GenerateExpectedTargetsCode( "set(_cmake_targets_not_defined \"\")\n" "set(_cmake_expected_targets \"\")\n" "foreach(_cmake_expected_target " << expectedTargets << ")\n" - " list(APPEND _cmake_expected_targets ${_cmake_expected_target})\n" - " if(TARGET ${_cmake_expected_target})\n" - " list(APPEND _cmake_targets_defined ${_cmake_expected_target})\n" + " list(APPEND _cmake_expected_targets \"${_cmake_expected_target}\")\n" + " if(TARGET \"${_cmake_expected_target}\")\n" + " list(APPEND _cmake_targets_defined \"${_cmake_expected_target}\")\n" " else()\n" - " list(APPEND _cmake_targets_not_defined ${_cmake_expected_target})\n" + " list(APPEND _cmake_targets_not_defined \"${_cmake_expected_target}\")\n" " endif()\n" "endforeach()\n" "if(_cmake_targets_defined STREQUAL _cmake_expected_targets)\n" diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 3d667cb..edee26d 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -257,7 +257,7 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os) << "file(GLOB _cmake_config_files \"${_DIR}/" << this->GetConfigImportFileGlob() << "\")\n" << "foreach(_cmake_config_file ${_cmake_config_files})\n" - << " include(${_cmake_config_file})\n" + << " include(\"${_cmake_config_file}\")\n" << "endforeach()\n" << "\n"; /* clang-format on */ -- cgit v0.12