From ed6e9abf9817341f70e43aec7249248409f53225 Mon Sep 17 00:00:00 2001 From: Matthew Woehlke Date: Tue, 19 May 2026 13:31:56 -0400 Subject: [PATCH] CPS, SBOM: Fix default output destination - Change default CPS install path on Windows from `cps` to `cps/`, per community recommendation that only paths containing the package name should be considered as "officially" supported search locations (see https://github.com/cps-org/cps/issues/79#issuecomment-2831102822). - Change `export` to write to a subdirectory that allows the build tree to be used as a search root. - Change SBOM destinations to be consistent with the preceding. Issue: #27785 --- Help/command/export.rst | 7 +++++-- Help/release/4.3.rst | 6 ++++++ Source/cmExportCommand.cxx | 3 ++- Source/cmInstallCommand.cxx | 18 +++++++++--------- Source/cmPackageInfoArguments.cxx | 9 +++++++++ Source/cmPackageInfoArguments.h | 1 + Source/cmSbomArguments.cxx | 9 +++++++++ Source/cmSbomArguments.h | 1 + .../CXXModulesCompile/RunCMakeTest.cmake | 2 +- .../exp-bmi-and-iface-build/CMakeLists.txt | 2 +- .../exp-command-sepdir-build/CMakeLists.txt | 3 +-- .../exp-iface-build/CMakeLists.txt | 3 +-- .../exp-iface-no-props-build/CMakeLists.txt | 2 +- .../exp-incdirs-build/CMakeLists.txt | 3 +-- .../exp-incdirs-old-cmake-build/CMakeLists.txt | 2 +- .../exp-trans-mods-build/CMakeLists.txt | 4 +--- .../exp-trans-mods1-build/CMakeLists.txt | 3 +-- .../exp-trans-targets-build/CMakeLists.txt | 2 +- .../exp-usage-build/CMakeLists.txt | 2 +- .../exp-with-headers-build/CMakeLists.txt | 3 +-- .../imp-std-exp-no-std-build/CMakeLists.txt | 2 +- .../imp-std-not-in-exp-build/CMakeLists.txt | 2 +- .../CpsExportImportBuild/TestExecutable.cmake | 4 ++-- .../ExportPackageInfo/Appendix-check.cmake | 4 ++-- .../ExportPackageInfo/CompileOnly-check.cmake | 2 +- .../ExportPackageInfo/Config-check.cmake | 2 +- .../DependencyVersionCMake-check.cmake | 2 +- .../DependencyVersionCps-check.cmake | 2 +- ...ependsMultipleDifferentNamespace-stderr.txt | 8 ++++---- .../DependsMultipleDifferentSets-stderr.txt | 8 ++++---- .../ExportPackageInfo/EmptyConfig-check.cmake | 2 +- .../ExportSymbolicComponent-check.cmake | 2 +- .../FileSetHeaders-check.cmake | 2 +- .../InterfaceProperties-check.cmake | 2 +- .../LinkDependentLibraries-check.cmake | 2 +- .../ExportPackageInfo/LinkOnly-check.cmake | 2 +- .../LowerCaseFile-check.cmake | 4 ++-- .../ExportPackageInfo/Metadata-check.cmake | 2 +- .../ExportPackageInfo/Minimal-check.cmake | 2 +- .../MinimalVersion-check.cmake | 6 +++--- .../NoProjectMetadata-check.cmake | 2 +- .../ProjectMetadata-check.cmake | 6 +++--- .../ExportPackageInfo/Requirements-check.cmake | 4 ++-- .../ExportPackageInfo/TargetTypes-check.cmake | 2 +- .../TransitiveSymbolicComponent-check.cmake | 2 +- .../ApplicationTarget-install-check.cmake | 2 +- .../InterfaceTarget-install-check.cmake | 2 +- ...MissingPackageNamespace-install-check.cmake | 2 +- .../ProjectMetadata-install-check.cmake | 2 +- ...rencesNonExportedTarget-install-check.cmake | 2 +- .../Requirements-install-check.cmake | 4 ++-- .../SharedTarget-install-check.cmake | 2 +- 52 files changed, 101 insertions(+), 78 deletions(-) diff --git a/Help/command/export.rst b/Help/command/export.rst index 0ecdbd9230..7b7420599c 100644 --- a/Help/command/export.rst +++ b/Help/command/export.rst @@ -161,7 +161,8 @@ tree. The imported targets are implicitly in the namespace ````. The default file name is ``[-].cps``. If the ``LOWER_CASE_FILE`` option is given, the file name will use the package name -converted to lower case. +converted to lower case. Files are written to the ``cps/`` +subdirectory of the current build directory. See :command:`install(PACKAGE_INFO)` for a description of the other options. @@ -188,7 +189,9 @@ Exporting Software Bill of Materials (SBOM) Documents Experimental. Gated by ``CMAKE_EXPERIMENTAL_GENERATE_SBOM``. Generates a software bill of materials (SBOM) document describing the targets -in the export ```` and their dependencies in the build tree +in the export ```` and their dependencies in the build tree. +Files are written to the ``sbom/`` subdirectory of the current +build directory. See :command:`install(SBOM)` for details about the supported SBOM formats and a description of the other options. diff --git a/Help/release/4.3.rst b/Help/release/4.3.rst index b13656f194..59beb597d3 100644 --- a/Help/release/4.3.rst +++ b/Help/release/4.3.rst @@ -292,3 +292,9 @@ Changes made since CMake 4.3.0 include the following. * These versions made no changes to documented features or interfaces. Some implementation updates were made to support ecosystem changes and/or fix regressions. + +.. 4.3.3 + + * The :command:`export(PACKAGE_INFO)` command now writes to the + ``cps/`` subdirectory of the current build directory, rather + than directly to the current build directory. diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 38c24588d5..53eafe6f73 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -375,7 +375,8 @@ static bool HandleSpecialExportMode(std::vector const& args, cmMakefile& mf = status.GetMakefile(); cmGlobalGenerator* gg = mf.GetGlobalGenerator(); - std::string const& dir = mf.GetCurrentBinaryDirectory(); + std::string const& dir = + arguments.GetDefaultDestination(mf.GetCurrentBinaryDirectory()); std::string const fname = cmStrCat(dir, '/', arguments.GetPackageFileName()); if (gg->GetExportedTargetsFile(fname)) { diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 1d37546a51..3a6150f59f 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -2141,10 +2141,10 @@ bool HandleMappedPackageInfo( std::string dest = std::string{ directive }; if (dest.empty()) { if (helper.Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME") == "Windows") { - dest = std::string{ "cps"_s }; + dest = arguments.GetDefaultDestination(); } else { - dest = cmStrCat(helper.GetLibraryDestination(nullptr), "/cps/", - arguments.GetPackageDirName()); + dest = + arguments.GetDefaultDestination(helper.GetLibraryDestination(nullptr)); } } @@ -2356,10 +2356,10 @@ bool HandlePackageInfoMode(std::vector const& args, std::string dest = ica.GetDestination(); if (dest.empty()) { if (helper.Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME") == "Windows") { - dest = std::string{ "cps"_s }; + dest = arguments.GetDefaultDestination(); } else { - dest = cmStrCat(helper.GetLibraryDestination(nullptr), "/cps/", - arguments.GetPackageDirName()); + dest = + arguments.GetDefaultDestination(helper.GetLibraryDestination(nullptr)); } } @@ -2558,10 +2558,10 @@ bool HandleSbomMode(std::vector const& args, std::string dest = ica.GetDestination(); if (dest.empty()) { if (helper.Makefile->GetSafeDefinition("CMAKE_SYSTEM_NAME") == "Windows") { - dest = std::string{ "/sbom/"_s }; + dest = arguments.GetDefaultDestination(); } else { - dest = cmStrCat(helper.GetLibraryDestination(nullptr), "/sbom/", - arguments.GetPackageDirName()); + dest = + arguments.GetDefaultDestination(helper.GetLibraryDestination(nullptr)); } } diff --git a/Source/cmPackageInfoArguments.cxx b/Source/cmPackageInfoArguments.cxx index 8408152955..e9fe498cf0 100644 --- a/Source/cmPackageInfoArguments.cxx +++ b/Source/cmPackageInfoArguments.cxx @@ -89,3 +89,12 @@ std::string cmPackageInfoArguments::GetPackageFileName() const } return cmStrCat(pkgNameOnDisk, ".cps"_s); } + +std::string cmPackageInfoArguments::GetDefaultDestination( + std::string const& root) const +{ + if (root.empty()) { + return cmStrCat("cps/"_s, this->GetPackageDirName()); + } + return cmStrCat(root, '/', "cps/"_s, this->GetPackageDirName()); +} diff --git a/Source/cmPackageInfoArguments.h b/Source/cmPackageInfoArguments.h index f8f1753931..a6e978f5d0 100644 --- a/Source/cmPackageInfoArguments.h +++ b/Source/cmPackageInfoArguments.h @@ -43,6 +43,7 @@ public: std::string GetNamespace() const; std::string GetPackageDirName() const; std::string GetPackageFileName() const; + std::string GetDefaultDestination(std::string const& root = {}) const; bool Check(cmExecutionStatus& status) const override; diff --git a/Source/cmSbomArguments.cxx b/Source/cmSbomArguments.cxx index 76322ab494..e3cdadd67f 100644 --- a/Source/cmSbomArguments.cxx +++ b/Source/cmSbomArguments.cxx @@ -87,6 +87,15 @@ std::string cmSbomArguments::GetPackageDirName() const return this->PackageName; } +std::string cmSbomArguments::GetDefaultDestination( + std::string const& root) const +{ + if (root.empty()) { + return cmStrCat("sbom/"_s, this->GetPackageDirName()); + } + return cmStrCat(root, '/', "sbom/"_s, this->GetPackageDirName()); +} + cmSbomArguments::SbomFormat cmSbomArguments::GetFormat() const { if (this->Format.empty()) { diff --git a/Source/cmSbomArguments.h b/Source/cmSbomArguments.h index 50f04983a3..aafa84feed 100644 --- a/Source/cmSbomArguments.h +++ b/Source/cmSbomArguments.h @@ -37,6 +37,7 @@ public: std::string GetNamespace() const; std::string GetPackageDirName() const; std::string GetPackageFileName() const; + std::string GetDefaultDestination(std::string const& root = {}) const; SbomFormat GetFormat() const; ArgumentParser::NonEmpty Format; diff --git a/Tests/RunCMake/CXXModulesCompile/RunCMakeTest.cmake b/Tests/RunCMake/CXXModulesCompile/RunCMakeTest.cmake index cd248390bd..ceef58cc3f 100644 --- a/Tests/RunCMake/CXXModulesCompile/RunCMakeTest.cmake +++ b/Tests/RunCMake/CXXModulesCompile/RunCMakeTest.cmake @@ -299,7 +299,7 @@ if ("export_bmi" IN_LIST CMake_TEST_MODULE_COMPILATION) run_cxx_module_test(exp-command-sepdir-build) run_cxx_module_test(exp-trans-targets-build) run_cxx_module_test(exp-trans-mods1-build) - run_cxx_module_test(exp-trans-mods-build exp-trans-mods-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/exp-trans-mods1-build-build" "-Dexport_transitive_modules1_cps_DIR=${RunCMake_BINARY_DIR}/exp-trans-mods1-build-build") + run_cxx_module_test(exp-trans-mods-build exp-trans-mods-build "-DCMAKE_PREFIX_PATH=${RunCMake_BINARY_DIR}/exp-trans-mods1-build-build") run_cxx_module_test(exp-with-headers-build) if ("collation" IN_LIST CMake_TEST_MODULE_COMPILATION AND diff --git a/Tests/RunCMake/CXXModulesCompile/exp-bmi-and-iface-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-bmi-and-iface-build/CMakeLists.txt index cbe8fb749a..98b4629da2 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-bmi-and-iface-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-bmi-and-iface-build/CMakeLists.txt @@ -54,7 +54,7 @@ add_test(NAME export_bmi_and_interfaces_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_bmi_and_interfaces_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-command-sepdir-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-command-sepdir-build/CMakeLists.txt index 2fe8960b1d..a6bf7c5e1f 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-command-sepdir-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-command-sepdir-build/CMakeLists.txt @@ -34,8 +34,7 @@ add_test(NAME export_sepdir_build COMMAND "${CMAKE_COMMAND}" "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" - "-Dexport_sepdir_DIR=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_sepdir_cps_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-iface-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-iface-build/CMakeLists.txt index 80db2e9cf9..cb99e462a4 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-iface-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-iface-build/CMakeLists.txt @@ -56,8 +56,7 @@ add_test(NAME export_interfaces_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_interfaces_DIR=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_interfaces_cps_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-iface-no-props-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-iface-no-props-build/CMakeLists.txt index decadf79f5..27c7adf8e6 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-iface-no-props-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-iface-no-props-build/CMakeLists.txt @@ -51,7 +51,7 @@ add_test(NAME export_interfaces_build COMMAND "${CMAKE_COMMAND}" "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" - "-Dexport_interfaces_no_properties_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-incdirs-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-incdirs-build/CMakeLists.txt index a1607e4afb..e22483aa05 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-incdirs-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-incdirs-build/CMakeLists.txt @@ -62,8 +62,7 @@ add_test(NAME export_include_directories_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_include_directories_DIR=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_include_directories_cps_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-incdirs-old-cmake-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-incdirs-old-cmake-build/CMakeLists.txt index 5254117d0a..0fd62b26da 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-incdirs-old-cmake-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-incdirs-old-cmake-build/CMakeLists.txt @@ -42,7 +42,7 @@ add_test(NAME export_include_directories_old_cmake_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_include_directories_old_cmake_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-trans-mods-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-trans-mods-build/CMakeLists.txt index 8a87e7a4f3..574fb370c2 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-trans-mods-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-trans-mods-build/CMakeLists.txt @@ -68,9 +68,7 @@ add_test(NAME export_transitive_modules_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_transitive_modules_DIR=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_transitive_modules1_cps_DIR=${CMAKE_PREFIX_PATH}" - "-Dexport_transitive_modules_cps_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR};${CMAKE_PREFIX_PATH}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-trans-mods1-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-trans-mods1-build/CMakeLists.txt index 530c61ea8b..d259adbacf 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-trans-mods1-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-trans-mods1-build/CMakeLists.txt @@ -45,8 +45,7 @@ add_test(NAME export_transitive_modules1_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_transitive_modules1_DIR=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_transitive_modules1_cps_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-trans-targets-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-trans-targets-build/CMakeLists.txt index 435f949ad3..1476bb2839 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-trans-targets-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-trans-targets-build/CMakeLists.txt @@ -65,7 +65,7 @@ add_test(NAME export_transitive_targets_build "${CMAKE_COMMAND}" "-Dexpected_source_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexpected_binary_dir=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_transitive_targets_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-usage-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-usage-build/CMakeLists.txt index a58e287213..95afed0b61 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-usage-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-usage-build/CMakeLists.txt @@ -104,7 +104,7 @@ add_test(NAME export_usage_build "${CMAKE_COMMAND}" "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" "-Dexport_interfaces_flag=${variable_flag}" - "-Dexport_usage_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/exp-with-headers-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/exp-with-headers-build/CMakeLists.txt index 8672cb81d8..fa40539f73 100644 --- a/Tests/RunCMake/CXXModulesCompile/exp-with-headers-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/exp-with-headers-build/CMakeLists.txt @@ -46,8 +46,7 @@ endif () add_test(NAME export_with_headers_build COMMAND "${CMAKE_COMMAND}" - "-Dexport_with_headers_DIR=${CMAKE_CURRENT_BINARY_DIR}" - "-Dexport_with_headers_cps_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt index e981f3b65f..7e1f998873 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-exp-no-std-build/CMakeLists.txt @@ -53,7 +53,7 @@ add_test(NAME import_std_export_no_std_build COMMAND "${CMAKE_COMMAND}" "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" - "-Dimport_std_export_no_std_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt index 7b7ca316c1..2298cf61c5 100644 --- a/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt +++ b/Tests/RunCMake/CXXModulesCompile/imp-std-not-in-exp-build/CMakeLists.txt @@ -48,7 +48,7 @@ add_test(NAME import_std_not_in_export_build COMMAND "${CMAKE_COMMAND}" "-Dexpected_dir=${CMAKE_CURRENT_SOURCE_DIR}" - "-Dimport_std_not_in_export_DIR=${CMAKE_CURRENT_BINARY_DIR}" + "-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_BINARY_DIR}" ${generator} -S "${CMAKE_CURRENT_SOURCE_DIR}/test" -B "${CMAKE_CURRENT_BINARY_DIR}/test") diff --git a/Tests/RunCMake/CpsExportImportBuild/TestExecutable.cmake b/Tests/RunCMake/CpsExportImportBuild/TestExecutable.cmake index 325088d7fb..9218737e37 100644 --- a/Tests/RunCMake/CpsExportImportBuild/TestExecutable.cmake +++ b/Tests/RunCMake/CpsExportImportBuild/TestExecutable.cmake @@ -1,7 +1,7 @@ project(TestLibrary C) -set(liba_DIR "${CMAKE_BINARY_DIR}/../TestLibrary-build") -set(libb_DIR "${CMAKE_BINARY_DIR}/../TestLibrary-build") +set(liba_DIR "${CMAKE_BINARY_DIR}/../TestLibrary-build/cps/liba") +set(libb_DIR "${CMAKE_BINARY_DIR}/../TestLibrary-build/cps/libb") find_package(libb REQUIRED COMPONENTS libb) diff --git a/Tests/RunCMake/ExportPackageInfo/Appendix-check.cmake b/Tests/RunCMake/ExportPackageInfo/Appendix-check.cmake index 8d55625613..b9325ce277 100644 --- a/Tests/RunCMake/ExportPackageInfo/Appendix-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/Appendix-check.cmake @@ -2,13 +2,13 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/Appendix-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "interface" "components" "mammal" "type") expect_value("${content}" "LGPL-3.0-or-later" "default_license") expect_value("${content}" "1.0" "version") -file(READ "${out_dir}/foo-dog.cps" content) +file(READ "${out_dir}/cps/foo/foo-dog.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "interface" "components" "canine" "type") expect_value("${content}" "GPL-3.0-or-later" "default_license") diff --git a/Tests/RunCMake/ExportPackageInfo/CompileOnly-check.cmake b/Tests/RunCMake/ExportPackageInfo/CompileOnly-check.cmake index 11671df014..e7858a9675 100644 --- a/Tests/RunCMake/ExportPackageInfo/CompileOnly-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/CompileOnly-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/CompileOnly-build") -file(READ "${out_dir}/bar.cps" content) +file(READ "${out_dir}/cps/bar/bar.cps" content) string(JSON component GET "${content}" "components" "bar") expect_array("${component}" 2 "compile_requires") expect_value("${component}" "foo:linkOnlyOne" "compile_requires" 0) diff --git a/Tests/RunCMake/ExportPackageInfo/Config-check.cmake b/Tests/RunCMake/ExportPackageInfo/Config-check.cmake index acb4ecd310..099c18979d 100644 --- a/Tests/RunCMake/ExportPackageInfo/Config-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/Config-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/Config-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) if(RunCMake_GENERATOR_IS_MULTI_CONFIG) foreach(config FooConfig BarConfig) diff --git a/Tests/RunCMake/ExportPackageInfo/DependencyVersionCMake-check.cmake b/Tests/RunCMake/ExportPackageInfo/DependencyVersionCMake-check.cmake index e4822b7a20..074a097b0a 100644 --- a/Tests/RunCMake/ExportPackageInfo/DependencyVersionCMake-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/DependencyVersionCMake-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/DependencyVersionCMake-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_array("${content}" 1 "requires" "bar" "components") expect_value("${content}" "bar" "requires" "bar" "components" 0) diff --git a/Tests/RunCMake/ExportPackageInfo/DependencyVersionCps-check.cmake b/Tests/RunCMake/ExportPackageInfo/DependencyVersionCps-check.cmake index 0b84ec1ae5..0065f22291 100644 --- a/Tests/RunCMake/ExportPackageInfo/DependencyVersionCps-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/DependencyVersionCps-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/DependencyVersionCps-build/") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_array("${content}" 1 "requires" "baz" "components") expect_value("${content}" "baz" "requires" "baz" "components" 0) diff --git a/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-stderr.txt b/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-stderr.txt index 5e47e73b76..d65d17f6ad 100644 --- a/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-stderr.txt +++ b/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-stderr.txt @@ -2,8 +2,8 @@ CMake Error in CMakeLists\.txt: export called with target "bar" which requires target "foo" that is not in this export set, but in another export set which is exported multiple times with different namespaces:.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/foo\.cmake,.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/foo\.cps\. + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/cps/foo/foo\.cps,.* + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/foo\.cmake\. An exported target cannot depend upon another target which is exported in more than one export set or with more than one namespace\. Consider @@ -14,8 +14,8 @@ CMake Error in CMakeLists\.txt: export called with target "bar" which requires target "foo" that is not in this export set, but in another export set which is exported multiple times with different namespaces:.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/foo\.cmake,.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/foo\.cps\. + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/cps/foo/foo\.cps,.* + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentNamespace-build/foo\.cmake\. An exported target cannot depend upon another target which is exported in more than one export set or with more than one namespace\. Consider diff --git a/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-stderr.txt b/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-stderr.txt index 643c9f0ad4..e88ea58d83 100644 --- a/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-stderr.txt +++ b/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-stderr.txt @@ -1,9 +1,9 @@ CMake Error in CMakeLists\.txt: export called with target "bar" which requires target "foo" that is not in this export set, but in multiple other export sets:.* + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/cps/foo/foo\.cps,.* .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo-alt\.cmake,.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo\.cmake,.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo\.cps\. + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo\.cmake\. An exported target cannot depend upon another target which is exported in more than one export set or with more than one namespace\. Consider @@ -13,9 +13,9 @@ CMake Error in CMakeLists\.txt: CMake Error in CMakeLists\.txt: export called with target "bar" which requires target "foo" that is not in this export set, but in multiple other export sets:.* + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/cps/foo/foo\.cps,.* .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo-alt\.cmake,.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo\.cmake,.* - .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo\.cps\. + .*/Tests/RunCMake/ExportPackageInfo/DependsMultipleDifferentSets-build/foo\.cmake\. An exported target cannot depend upon another target which is exported in more than one export set or with more than one namespace\. Consider diff --git a/Tests/RunCMake/ExportPackageInfo/EmptyConfig-check.cmake b/Tests/RunCMake/ExportPackageInfo/EmptyConfig-check.cmake index ffabf80bf2..fc735f7beb 100644 --- a/Tests/RunCMake/ExportPackageInfo/EmptyConfig-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/EmptyConfig-check.cmake @@ -2,6 +2,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/EmptyConfig-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_object("${content}" "components" "foo" "configurations" "noconfig") diff --git a/Tests/RunCMake/ExportPackageInfo/ExportSymbolicComponent-check.cmake b/Tests/RunCMake/ExportPackageInfo/ExportSymbolicComponent-check.cmake index 4aa44efa6b..aa9a92bf80 100644 --- a/Tests/RunCMake/ExportPackageInfo/ExportSymbolicComponent-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/ExportSymbolicComponent-check.cmake @@ -2,6 +2,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/ExportSymbolicComponent-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "symbolic" "components" "foo" "type") diff --git a/Tests/RunCMake/ExportPackageInfo/FileSetHeaders-check.cmake b/Tests/RunCMake/ExportPackageInfo/FileSetHeaders-check.cmake index 60f582028b..ee05bb2ae3 100644 --- a/Tests/RunCMake/ExportPackageInfo/FileSetHeaders-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/FileSetHeaders-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/FileSetHeaders-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) string(JSON component GET "${content}" "components" "foo") diff --git a/Tests/RunCMake/ExportPackageInfo/InterfaceProperties-check.cmake b/Tests/RunCMake/ExportPackageInfo/InterfaceProperties-check.cmake index a93b676aa3..31fc957d9d 100644 --- a/Tests/RunCMake/ExportPackageInfo/InterfaceProperties-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/InterfaceProperties-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/InterfaceProperties-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") string(JSON component GET "${content}" "components" "foo") diff --git a/Tests/RunCMake/ExportPackageInfo/LinkDependentLibraries-check.cmake b/Tests/RunCMake/ExportPackageInfo/LinkDependentLibraries-check.cmake index 19eb3f135c..f22f5fa987 100644 --- a/Tests/RunCMake/ExportPackageInfo/LinkDependentLibraries-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/LinkDependentLibraries-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/LinkDependentLibraries-build") -file(READ "${out_dir}/dyld.cps" content) +file(READ "${out_dir}/cps/dyld/dyld.cps" content) expect_value("${content}" "dyld" "name") expect_value("${content}" "dylib" "components" "private" "type") expect_value("${content}" "dylib" "components" "public" "type") diff --git a/Tests/RunCMake/ExportPackageInfo/LinkOnly-check.cmake b/Tests/RunCMake/ExportPackageInfo/LinkOnly-check.cmake index e541399143..3ae31d1c7d 100644 --- a/Tests/RunCMake/ExportPackageInfo/LinkOnly-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/LinkOnly-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/LinkOnly-build") -file(READ "${out_dir}/bar.cps" content) +file(READ "${out_dir}/cps/bar/bar.cps" content) string(JSON component GET "${content}" "components" "bar") expect_array("${component}" 2 "link_requires") expect_value("${component}" "foo:linkOnlyOne" "link_requires" 0) diff --git a/Tests/RunCMake/ExportPackageInfo/LowerCaseFile-check.cmake b/Tests/RunCMake/ExportPackageInfo/LowerCaseFile-check.cmake index 279521cd6c..af1b35c2af 100644 --- a/Tests/RunCMake/ExportPackageInfo/LowerCaseFile-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/LowerCaseFile-check.cmake @@ -2,8 +2,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/LowerCaseFile-build") -file(READ "${out_dir}/lowercase.cps" content) +file(READ "${out_dir}/cps/lowercase/lowercase.cps" content) expect_value("${content}" "LowerCase" "name") -file(READ "${out_dir}/PreserveCase.cps" content) +file(READ "${out_dir}/cps/PreserveCase/PreserveCase.cps" content) expect_value("${content}" "PreserveCase" "name") diff --git a/Tests/RunCMake/ExportPackageInfo/Metadata-check.cmake b/Tests/RunCMake/ExportPackageInfo/Metadata-check.cmake index 438a76c533..7f260d804e 100644 --- a/Tests/RunCMake/ExportPackageInfo/Metadata-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/Metadata-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/Metadata-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "1.2.3" "version") expect_value("${content}" "1.2.0" "compat_version") diff --git a/Tests/RunCMake/ExportPackageInfo/Minimal-check.cmake b/Tests/RunCMake/ExportPackageInfo/Minimal-check.cmake index 3c9993c20b..74e84be2c0 100644 --- a/Tests/RunCMake/ExportPackageInfo/Minimal-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/Minimal-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/Minimal-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "interface" "components" "foo" "type") expect_missing("${content}" "version") diff --git a/Tests/RunCMake/ExportPackageInfo/MinimalVersion-check.cmake b/Tests/RunCMake/ExportPackageInfo/MinimalVersion-check.cmake index 025c5fcba8..d96e4b2e88 100644 --- a/Tests/RunCMake/ExportPackageInfo/MinimalVersion-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/MinimalVersion-check.cmake @@ -2,19 +2,19 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/MinimalVersion-build") -file(READ "${out_dir}/foo1.cps" content) +file(READ "${out_dir}/cps/foo1/foo1.cps" content) expect_value("${content}" "foo1" "name") expect_value("${content}" "1.0" "version") expect_missing("${content}" "compat_version") expect_missing("${content}" "version_schema") -file(READ "${out_dir}/foo2.cps" content) +file(READ "${out_dir}/cps/foo2/foo2.cps" content) expect_value("${content}" "foo2" "name") expect_value("${content}" "1.5" "version") expect_value("${content}" "1.0" "compat_version") expect_missing("${content}" "version_schema") -file(READ "${out_dir}/foo3.cps" content) +file(READ "${out_dir}/cps/foo3/foo3.cps" content) expect_value("${content}" "foo3" "name") expect_value("${content}" "1.0" "version") expect_missing("${content}" "compat_version") diff --git a/Tests/RunCMake/ExportPackageInfo/NoProjectMetadata-check.cmake b/Tests/RunCMake/ExportPackageInfo/NoProjectMetadata-check.cmake index 721a57a9a1..1c4faf076c 100644 --- a/Tests/RunCMake/ExportPackageInfo/NoProjectMetadata-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/NoProjectMetadata-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/NoProjectMetadata-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_missing("${content}" "version") expect_missing("${content}" "compat_version") diff --git a/Tests/RunCMake/ExportPackageInfo/ProjectMetadata-check.cmake b/Tests/RunCMake/ExportPackageInfo/ProjectMetadata-check.cmake index c7201f8236..db15b53492 100644 --- a/Tests/RunCMake/ExportPackageInfo/ProjectMetadata-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/ProjectMetadata-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/ProjectMetadata-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "1.2.3" "version") expect_value("${content}" "1.1.0" "compat_version") @@ -10,7 +10,7 @@ expect_value("${content}" "BSD-3-Clause" "license") expect_value("${content}" "Sample package" "description") expect_value("${content}" "https://www.example.com/package/foo" "website") -file(READ "${out_dir}/test1.cps" content) +file(READ "${out_dir}/cps/test1/test1.cps" content) expect_value("${content}" "test1" "name") expect_value("${content}" "1.2.3" "version") expect_value("${content}" "1.1.0" "compat_version") @@ -18,7 +18,7 @@ expect_value("${content}" "BSD-3-Clause" "license") expect_value("${content}" "Sample package" "description") expect_value("${content}" "https://www.example.com/package/foo" "website") -file(READ "${out_dir}/test2.cps" content) +file(READ "${out_dir}/cps/test2/test2.cps" content) expect_value("${content}" "test2" "name") expect_value("${content}" "1.4.7" "version") expect_missing("${content}" "compat_version") diff --git a/Tests/RunCMake/ExportPackageInfo/Requirements-check.cmake b/Tests/RunCMake/ExportPackageInfo/Requirements-check.cmake index 226c4c296a..5c54d79e21 100644 --- a/Tests/RunCMake/ExportPackageInfo/Requirements-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/Requirements-check.cmake @@ -2,11 +2,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/Requirements-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "interface" "components" "libb" "type") -file(READ "${out_dir}/bar.cps" content) +file(READ "${out_dir}/cps/bar/bar.cps" content) expect_value("${content}" "bar" "name") expect_array("${content}" 1 "requires" "foo" "components") expect_value("${content}" "libb" "requires" "foo" "components" 0) diff --git a/Tests/RunCMake/ExportPackageInfo/TargetTypes-check.cmake b/Tests/RunCMake/ExportPackageInfo/TargetTypes-check.cmake index 1c87fcf180..818ac867f2 100644 --- a/Tests/RunCMake/ExportPackageInfo/TargetTypes-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/TargetTypes-check.cmake @@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/TargetTypes-build") -file(READ "${out_dir}/foo.cps" content) +file(READ "${out_dir}/cps/foo/foo.cps" content) expect_value("${content}" "foo" "name") expect_value("${content}" "archive" "components" "foo-static" "type") expect_value("${content}" "dylib" "components" "foo-shared" "type") diff --git a/Tests/RunCMake/ExportPackageInfo/TransitiveSymbolicComponent-check.cmake b/Tests/RunCMake/ExportPackageInfo/TransitiveSymbolicComponent-check.cmake index fbadeb82b0..833e26a239 100644 --- a/Tests/RunCMake/ExportPackageInfo/TransitiveSymbolicComponent-check.cmake +++ b/Tests/RunCMake/ExportPackageInfo/TransitiveSymbolicComponent-check.cmake @@ -3,7 +3,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/Assertions.cmake) set(out_dir "${RunCMake_BINARY_DIR}/TransitiveSymbolicComponent-build") -file(READ "${out_dir}/bar.cps" content) +file(READ "${out_dir}/cps/bar/bar.cps" content) expect_value("${content}" "bar" "name") expect_array("${content}" 1 "requires" "Symbolic" "components") expect_value("${content}" "test" "requires" "Symbolic" "components" 0) diff --git a/Tests/RunCMake/ExportSbom/ApplicationTarget-install-check.cmake b/Tests/RunCMake/ExportSbom/ApplicationTarget-install-check.cmake index 4a8049e34e..0ff030ef0b 100644 --- a/Tests/RunCMake/ExportSbom/ApplicationTarget-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/ApplicationTarget-install-check.cmake @@ -1,2 +1,2 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/application_targets.spdx.json" content) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/application_targets/application_targets.spdx.json" content) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/ApplicationTarget-install-check.cmake) diff --git a/Tests/RunCMake/ExportSbom/InterfaceTarget-install-check.cmake b/Tests/RunCMake/ExportSbom/InterfaceTarget-install-check.cmake index 4c79c0e7f1..47f7e41ef0 100644 --- a/Tests/RunCMake/ExportSbom/InterfaceTarget-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/InterfaceTarget-install-check.cmake @@ -1,2 +1,2 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/interface_targets.spdx.json" content) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/interface_targets/interface_targets.spdx.json" content) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/InterfaceTarget-install-check.cmake) diff --git a/Tests/RunCMake/ExportSbom/MissingPackageNamespace-install-check.cmake b/Tests/RunCMake/ExportSbom/MissingPackageNamespace-install-check.cmake index a849beb0ce..842e77efa7 100644 --- a/Tests/RunCMake/ExportSbom/MissingPackageNamespace-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/MissingPackageNamespace-install-check.cmake @@ -1,2 +1,2 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/interface_targets.spdx.json" content) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/interface_targets/interface_targets.spdx.json" content) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/MissingPackageNamespace-install-check.cmake) diff --git a/Tests/RunCMake/ExportSbom/ProjectMetadata-install-check.cmake b/Tests/RunCMake/ExportSbom/ProjectMetadata-install-check.cmake index 2964d70921..34e57af218 100644 --- a/Tests/RunCMake/ExportSbom/ProjectMetadata-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/ProjectMetadata-install-check.cmake @@ -1,2 +1,2 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/test_targets.spdx.json" content) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/test_targets/test_targets.spdx.json" content) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/ProjectMetadata-install-check.cmake) diff --git a/Tests/RunCMake/ExportSbom/ReferencesNonExportedTarget-install-check.cmake b/Tests/RunCMake/ExportSbom/ReferencesNonExportedTarget-install-check.cmake index f5c3167ce8..465fcf0771 100644 --- a/Tests/RunCMake/ExportSbom/ReferencesNonExportedTarget-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/ReferencesNonExportedTarget-install-check.cmake @@ -1,2 +1,2 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/dog.spdx.json" content) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/dog/dog.spdx.json" content) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/ReferencesNonExportedTarget-install-check.cmake) diff --git a/Tests/RunCMake/ExportSbom/Requirements-install-check.cmake b/Tests/RunCMake/ExportSbom/Requirements-install-check.cmake index 8aeaf79b9b..5cae65a43d 100644 --- a/Tests/RunCMake/ExportSbom/Requirements-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/Requirements-install-check.cmake @@ -1,3 +1,3 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/bar.spdx.json" BAR_CONTENT) -file(READ "${RunCMake_TEST_BINARY_DIR}/foo.spdx.json" FOO_CONTENT) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/bar/bar.spdx.json" BAR_CONTENT) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/foo/foo.spdx.json" FOO_CONTENT) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/Requirements-install-check.cmake) diff --git a/Tests/RunCMake/ExportSbom/SharedTarget-install-check.cmake b/Tests/RunCMake/ExportSbom/SharedTarget-install-check.cmake index f5d5ab31d6..66c181721c 100644 --- a/Tests/RunCMake/ExportSbom/SharedTarget-install-check.cmake +++ b/Tests/RunCMake/ExportSbom/SharedTarget-install-check.cmake @@ -1,2 +1,2 @@ -file(READ "${RunCMake_TEST_BINARY_DIR}/shared_targets.spdx.json" content) +file(READ "${RunCMake_TEST_BINARY_DIR}/sbom/shared_targets/shared_targets.spdx.json" content) include(${CMAKE_CURRENT_LIST_DIR}/../Sbom/SharedTarget-install-check.cmake)