diff options
-rw-r--r-- | Source/cmExportFileGenerator.cxx | 56 | ||||
-rw-r--r-- | Source/cmExportInstallFileGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmInstallExportGenerator.cxx | 12 |
3 files changed, 37 insertions, 37 deletions
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index 3143c12..fb37080 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -985,34 +985,34 @@ void cmExportFileGenerator::GenerateExpectedTargetsCode( /* clang-format off */ os << "# Protect against multiple inclusion, which would fail when already " "imported targets are added once more.\n" - "set(_targetsDefined)\n" - "set(_targetsNotDefined)\n" - "set(_expectedTargets)\n" - "foreach(_expectedTarget " << expectedTargets << ")\n" - " list(APPEND _expectedTargets ${_expectedTarget})\n" - " if(NOT TARGET ${_expectedTarget})\n" - " list(APPEND _targetsNotDefined ${_expectedTarget})\n" + "set(_cmake_targets_defined)\n" + "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(NOT TARGET ${_cmake_expected_target})\n" + " list(APPEND _cmake_targets_not_defined ${_cmake_expected_target})\n" " endif()\n" - " if(TARGET ${_expectedTarget})\n" - " list(APPEND _targetsDefined ${_expectedTarget})\n" + " if(TARGET ${_cmake_expected_target})\n" + " list(APPEND _cmake_targets_defined ${_cmake_expected_target})\n" " endif()\n" "endforeach()\n" - "if(\"${_targetsDefined}\" STREQUAL \"${_expectedTargets}\")\n" - " unset(_targetsDefined)\n" - " unset(_targetsNotDefined)\n" - " unset(_expectedTargets)\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" " cmake_policy(POP)\n" " return()\n" "endif()\n" - "if(NOT \"${_targetsDefined}\" STREQUAL \"\")\n" + "if(NOT \"${_cmake_targets_defined}\" STREQUAL \"\")\n" " message(FATAL_ERROR \"Some (but not all) targets in this export " - "set were already defined.\\nTargets Defined: ${_targetsDefined}\\n" - "Targets not yet defined: ${_targetsNotDefined}\\n\")\n" + "set were already defined.\\nTargets Defined: ${_cmake_targets_defined}\\n" + "Targets not yet defined: ${_cmake_targets_not_defined}\\n\")\n" "endif()\n" - "unset(_targetsDefined)\n" - "unset(_targetsNotDefined)\n" - "unset(_expectedTargets)\n" + "unset(_cmake_targets_defined)\n" + "unset(_cmake_targets_not_defined)\n" + "unset(_cmake_expected_targets)\n" "\n\n"; /* clang-format on */ } @@ -1178,12 +1178,12 @@ void cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os) // but the development package was not installed.). /* clang-format off */ os << "# Loop over all imported files and verify that they actually exist\n" - "foreach(target ${_IMPORT_CHECK_TARGETS} )\n" - " foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )\n" - " if(NOT EXISTS \"${file}\" )\n" - " message(FATAL_ERROR \"The imported target \\\"${target}\\\"" + "foreach(_cmake_target IN LISTS _cmake_import_check_targets)\n" + " foreach(_cmake_file IN LISTS \"_cmake_import_check_files_for_${_cmake_target}\")\n" + " if(NOT EXISTS \"${_cmake_file}\")\n" + " message(FATAL_ERROR \"The imported target \\\"${_cmake_target}\\\"" " references the file\n" - " \\\"${file}\\\"\n" + " \\\"${_cmake_file}\\\"\n" "but this file does not exist. Possible reasons include:\n" "* The file was deleted, renamed, or moved to another location.\n" "* An install or uninstall procedure did not complete successfully.\n" @@ -1193,9 +1193,9 @@ void cmExportFileGenerator::GenerateImportedFileCheckLoop(std::ostream& os) "\")\n" " endif()\n" " endforeach()\n" - " unset(_IMPORT_CHECK_FILES_FOR_${target})\n" + " unset(\"_cmake_import_check_files_for_${_cmake_target}\")\n" "endforeach()\n" - "unset(_IMPORT_CHECK_TARGETS)\n" + "unset(_cmake_import_check_targets)\n" "\n"; /* clang-format on */ } @@ -1208,9 +1208,9 @@ void cmExportFileGenerator::GenerateImportedFileChecksCode( // Construct the imported target name. std::string targetName = cmStrCat(this->Namespace, target->GetExportName()); - os << "list(APPEND _IMPORT_CHECK_TARGETS " << targetName + os << "list(APPEND _cmake_import_check_targets " << targetName << " )\n" - "list(APPEND _IMPORT_CHECK_FILES_FOR_" + "list(APPEND _cmake_import_check_files_for_" << targetName << " "; for (std::string const& li : importedLocations) { diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx index 0c41946..3d667cb 100644 --- a/Source/cmExportInstallFileGenerator.cxx +++ b/Source/cmExportInstallFileGenerator.cxx @@ -254,10 +254,10 @@ void cmExportInstallFileGenerator::LoadConfigFiles(std::ostream& os) /* clang-format off */ os << "# Load information for each installed configuration.\n" << "get_filename_component(_DIR \"${CMAKE_CURRENT_LIST_FILE}\" PATH)\n" - << "file(GLOB CONFIG_FILES \"${_DIR}/" + << "file(GLOB _cmake_config_files \"${_DIR}/" << this->GetConfigImportFileGlob() << "\")\n" - << "foreach(f ${CONFIG_FILES})\n" - << " include(${f})\n" + << "foreach(_cmake_config_file ${_cmake_config_files})\n" + << " include(${_cmake_config_file})\n" << "endforeach()\n" << "\n"; /* clang-format on */ diff --git a/Source/cmInstallExportGenerator.cxx b/Source/cmInstallExportGenerator.cxx index 627f59d..eadfd2e 100644 --- a/Source/cmInstallExportGenerator.cxx +++ b/Source/cmInstallExportGenerator.cxx @@ -195,16 +195,16 @@ void cmInstallExportGenerator::GenerateScriptActions(std::ostream& os, Indent indentNN = indentN.Next(); Indent indentNNN = indentNN.Next(); /* clang-format off */ - os << indentN << "file(DIFFERENT EXPORT_FILE_CHANGED FILES\n" + os << indentN << "file(DIFFERENT _cmake_export_file_changed FILES\n" << indentN << " \"" << installedFile << "\"\n" << indentN << " \"" << this->MainImportFile << "\")\n"; - os << indentN << "if(EXPORT_FILE_CHANGED)\n"; - os << indentNN << "file(GLOB OLD_CONFIG_FILES \"" << installedDir + os << indentN << "if(_cmake_export_file_changed)\n"; + os << indentNN << "file(GLOB _cmake_old_config_files \"" << installedDir << this->EFGen->GetConfigImportFileGlob() << "\")\n"; - os << indentNN << "if(OLD_CONFIG_FILES)\n"; + os << indentNN << "if(_cmake_old_config_files)\n"; os << indentNNN << R"(message(STATUS "Old export file \")" << installedFile - << "\\\" will be replaced. Removing files [${OLD_CONFIG_FILES}].\")\n"; - os << indentNNN << "file(REMOVE ${OLD_CONFIG_FILES})\n"; + << "\\\" will be replaced. Removing files [${_cmake_old_config_files}].\")\n"; + os << indentNNN << "file(REMOVE ${_cmake_old_config_files})\n"; os << indentNN << "endif()\n"; os << indentN << "endif()\n"; os << indent << "endif()\n"; |