summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-27 15:21:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-27 15:22:05 (GMT)
commit2a12a83037dead14173fcf0219f4669229c67147 (patch)
treee2a56e2c491ef1b65610b309f81b5a17d329d269
parent81d863b60aa40c42f08736abbc3fa6715b553240 (diff)
parent3b632f32fae72ab70f752dd1e22ced40b7a81537 (diff)
downloadCMake-2a12a83037dead14173fcf0219f4669229c67147.zip
CMake-2a12a83037dead14173fcf0219f4669229c67147.tar.gz
CMake-2a12a83037dead14173fcf0219f4669229c67147.tar.bz2
Merge topic 'misc-cxxmodule-fixes'
3b632f32fa Tests/CXXModules: forward the default build type 5ab6b09691 Tests/CXXModules: fix multi-config and MSVC details 11b62ef118 Tests/CXXModules: add missing `bmi-only` and compiler id fields 5d9631fbdd Tests/CXXModules: fix key set mismatch error messages 86e7fb72cb Tests/CXXModules: use a less generic name for the config 6b940dc590 Tests/CXXModules: replace the object extension as well 1c9f83c8ec Tests/CXXModules: fix error detection propagation 7a4c02cb38 cmGlobalGenerator: factor out messaging for CMP0037 ... Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com> Merge-request: !8834
-rw-r--r--Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst6
-rw-r--r--Source/cmGeneratorTarget.cxx10
-rw-r--r--Source/cmGlobalGenerator.cxx32
-rw-r--r--Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-check.cmake15
-rw-r--r--Tests/RunCMake/CXXModules/NinjaDependInfoExport-check.cmake15
-rw-r--r--Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-check.cmake15
-rw-r--r--Tests/RunCMake/CXXModules/check-json.cmake22
-rw-r--r--Tests/RunCMake/CXXModules/compiler_introspection.cmake2
-rw-r--r--Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-private.json13
-rw-r--r--Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-public.json15
-rw-r--r--Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-private.json13
-rw-r--r--Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-public.json13
-rw-r--r--Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-private.json13
-rw-r--r--Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-public.json13
14 files changed, 127 insertions, 70 deletions
diff --git a/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst b/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst
index a7e9029..2e7f7c4 100644
--- a/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst
+++ b/Help/variable/CMAKE_EXPORT_COMPILE_COMMANDS.rst
@@ -15,7 +15,8 @@ form. The format of the JSON file looks like:
{
"directory": "/home/user/development/project",
"command": "/usr/bin/c++ ... -c ../foo/foo.cc",
- "file": "../foo/foo.cc"
+ "file": "../foo/foo.cc",
+ "output": "../foo.dir/foo.cc.o"
},
...
@@ -23,7 +24,8 @@ form. The format of the JSON file looks like:
{
"directory": "/home/user/development/project",
"command": "/usr/bin/c++ ... -c ../foo/bar.cc",
- "file": "../foo/bar.cc"
+ "file": "../foo/bar.cc",
+ "output": "../foo.dir/bar.cc.o"
}
]
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index ca38be6..181ffd1 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -4287,9 +4287,6 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config,
this->GetGlobalGenerator()->FindGeneratorTarget(*pchReuseFrom);
}
- filename = cmStrCat(
- generatorTarget->LocalGenerator->GetCurrentBinaryDirectory(), "/");
-
const std::map<std::string, std::string> languageToExtension = {
{ "C", ".h" },
{ "CXX", ".hxx" },
@@ -4297,8 +4294,7 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config,
{ "OBJCXX", ".objcxx.hxx" }
};
- filename =
- cmStrCat(filename, "CMakeFiles/", generatorTarget->GetName(), ".dir");
+ filename = generatorTarget->GetSupportDirectory();
if (this->GetGlobalGenerator()->IsMultiConfig()) {
filename = cmStrCat(filename, "/", config);
@@ -4391,9 +4387,7 @@ std::string cmGeneratorTarget::GetPchSource(const std::string& config,
this->GetGlobalGenerator()->FindGeneratorTarget(*pchReuseFrom);
}
- filename =
- cmStrCat(generatorTarget->LocalGenerator->GetCurrentBinaryDirectory(),
- "/CMakeFiles/", generatorTarget->GetName(), ".dir/cmake_pch");
+ filename = cmStrCat(generatorTarget->GetSupportDirectory(), "/cmake_pch");
// For GCC the source extension will be transformed into .h[xx].gch
if (!this->Makefile->IsOn("CMAKE_LINK_PCH")) {
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index d5099ee..933e754 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2690,13 +2690,9 @@ cmGlobalGenerator::SplitFrameworkPath(const std::string& path,
return cm::nullopt;
}
-bool cmGlobalGenerator::CheckCMP0037(std::string const& targetName,
- std::string const& reason) const
+static bool RaiseCMP0037Message(cmake* cm, cmTarget* tgt,
+ std::string const& reason)
{
- cmTarget* tgt = this->FindTarget(targetName);
- if (!tgt) {
- return true;
- }
MessageType messageType = MessageType::AUTHOR_WARNING;
std::ostringstream e;
bool issueMessage = false;
@@ -2715,13 +2711,12 @@ bool cmGlobalGenerator::CheckCMP0037(std::string const& targetName,
break;
}
if (issueMessage) {
- e << "The target name \"" << targetName << "\" is reserved " << reason
+ e << "The target name \"" << tgt->GetName() << "\" is reserved " << reason
<< ".";
if (messageType == MessageType::AUTHOR_WARNING) {
e << " It may result in undefined behavior.";
}
- this->GetCMakeInstance()->IssueMessage(messageType, e.str(),
- tgt->GetBacktrace());
+ cm->IssueMessage(messageType, e.str(), tgt->GetBacktrace());
if (messageType == MessageType::FATAL_ERROR) {
return false;
}
@@ -2729,6 +2724,16 @@ bool cmGlobalGenerator::CheckCMP0037(std::string const& targetName,
return true;
}
+bool cmGlobalGenerator::CheckCMP0037(std::string const& targetName,
+ std::string const& reason) const
+{
+ cmTarget* tgt = this->FindTarget(targetName);
+ if (!tgt) {
+ return true;
+ }
+ return RaiseCMP0037Message(this->GetCMakeInstance(), tgt, reason);
+}
+
void cmGlobalGenerator::CreateDefaultGlobalTargets(
std::vector<GlobalTargetInfo>& targets)
{
@@ -3142,10 +3147,11 @@ bool cmGlobalGenerator::IsReservedTarget(std::string const& name)
// by one or more of the cmake generators.
// Adding additional targets to this list will require a policy!
- const char* reservedTargets[] = { "all", "ALL_BUILD", "help",
- "install", "INSTALL", "preinstall",
- "clean", "edit_cache", "rebuild_cache",
- "ZERO_CHECK" };
+ static const cm::static_string_view reservedTargets[] = {
+ "all"_s, "ALL_BUILD"_s, "help"_s, "install"_s,
+ "INSTALL"_s, "preinstall"_s, "clean"_s, "edit_cache"_s,
+ "rebuild_cache"_s, "ZERO_CHECK"_s
+ };
return cm::contains(reservedTargets, name);
}
diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-check.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-check.cmake
index 0d08c44..6de2e1e 100644
--- a/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-check.cmake
+++ b/Tests/RunCMake/CXXModules/NinjaDependInfoBMIInstall-check.cmake
@@ -2,19 +2,19 @@ include("${CMAKE_CURRENT_LIST_DIR}/check-json.cmake")
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(have_file 0)
- foreach (config IN ITEMS Release Debug RelWithDebInfo MinSizeRel)
- if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-public.dir/${config}/CXXDependInfo.json")
+ foreach (CXXModules_config IN ITEMS Release Debug RelWithDebInfo MinSizeRel)
+ if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-public.dir/${CXXModules_config}/CXXDependInfo.json")
continue ()
endif ()
set(have_file 1)
- set(CMAKE_BUILD_TYPE "${config}")
+ set(CMAKE_BUILD_TYPE "${CXXModules_config}")
- file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-public.dir/${config}/CXXDependInfo.json" actual_contents)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-public.dir/${CXXModules_config}/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoBMIInstall-public.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
- file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-private.dir/${config}/CXXDependInfo.json" actual_contents)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-private.dir/${CXXModules_config}/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoBMIInstall-private.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
endforeach ()
@@ -24,6 +24,9 @@ if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
"No recognized build configurations found.")
endif ()
else ()
+ set(CXXModules_config "${CXXModules_default_build_type}")
+ set(CMAKE_BUILD_TYPE "${CXXModules_default_build_type}")
+
file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-bmi-install-public.dir/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoBMIInstall-public.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
@@ -32,3 +35,5 @@ else ()
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoBMIInstall-private.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
endif ()
+
+string(REPLACE ";" "\n " RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}")
diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoExport-check.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoExport-check.cmake
index 7720257..0c933c9 100644
--- a/Tests/RunCMake/CXXModules/NinjaDependInfoExport-check.cmake
+++ b/Tests/RunCMake/CXXModules/NinjaDependInfoExport-check.cmake
@@ -2,19 +2,19 @@ include("${CMAKE_CURRENT_LIST_DIR}/check-json.cmake")
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(have_file 0)
- foreach (config IN ITEMS Release Debug RelWithDebInfo MinSizeRel)
- if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-public.dir/${config}/CXXDependInfo.json")
+ foreach (CXXModules_config IN ITEMS Release Debug RelWithDebInfo MinSizeRel)
+ if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-public.dir/${CXXModules_config}/CXXDependInfo.json")
continue ()
endif ()
set(have_file 1)
- set(CMAKE_BUILD_TYPE "${config}")
+ set(CMAKE_BUILD_TYPE "${CXXModules_config}")
- file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-public.dir/${config}/CXXDependInfo.json" actual_contents)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-public.dir/${CXXModules_config}/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoExport-public.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
- file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-private.dir/${config}/CXXDependInfo.json" actual_contents)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-private.dir/${CXXModules_config}/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoExport-private.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
endforeach ()
@@ -24,6 +24,9 @@ if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
"No recognized build configurations found.")
endif ()
else ()
+ set(CXXModules_config "${CXXModules_default_build_type}")
+ set(CMAKE_BUILD_TYPE "${CXXModules_default_build_type}")
+
file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-exports-public.dir/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoExport-public.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
@@ -32,3 +35,5 @@ else ()
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoExport-private.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
endif ()
+
+string(REPLACE ";" "\n " RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}")
diff --git a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-check.cmake b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-check.cmake
index b9a1315..4eaa891 100644
--- a/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-check.cmake
+++ b/Tests/RunCMake/CXXModules/NinjaDependInfoFileSet-check.cmake
@@ -2,19 +2,19 @@ include("${CMAKE_CURRENT_LIST_DIR}/check-json.cmake")
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(have_file 0)
- foreach (config IN ITEMS Release Debug RelWithDebInfo MinSizeRel)
- if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-public.dir/${config}/CXXDependInfo.json")
+ foreach (CXXModules_config IN ITEMS Release Debug RelWithDebInfo MinSizeRel)
+ if (NOT EXISTS "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-public.dir/${CXXModules_config}/CXXDependInfo.json")
continue ()
endif ()
set(have_file 1)
- set(CMAKE_BUILD_TYPE "${config}")
+ set(CMAKE_BUILD_TYPE "${CXXModules_config}")
- file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-public.dir/${config}/CXXDependInfo.json" actual_contents)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-public.dir/${CXXModules_config}/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoFileSet-public.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
- file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-private.dir/${config}/CXXDependInfo.json" actual_contents)
+ file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-private.dir/${CXXModules_config}/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoFileSet-private.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
endforeach ()
@@ -24,6 +24,9 @@ if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
"No recognized build configurations found.")
endif ()
else ()
+ set(CXXModules_config "${CXXModules_default_build_type}")
+ set(CMAKE_BUILD_TYPE "${CXXModules_default_build_type}")
+
file(READ "${RunCMake_TEST_BINARY_DIR}/CMakeFiles/ninja-file-sets-public.dir/CXXDependInfo.json" actual_contents)
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoFileSet-public.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
@@ -32,3 +35,5 @@ else ()
file(READ "${CMAKE_CURRENT_LIST_DIR}/expect/NinjaDependInfoFileSet-private.json" expect_contents)
check_json("${actual_contents}" "${expect_contents}")
endif ()
+
+string(REPLACE ";" "\n " RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}")
diff --git a/Tests/RunCMake/CXXModules/check-json.cmake b/Tests/RunCMake/CXXModules/check-json.cmake
index 19d0c8a..bb04b36 100644
--- a/Tests/RunCMake/CXXModules/check-json.cmake
+++ b/Tests/RunCMake/CXXModules/check-json.cmake
@@ -2,19 +2,20 @@ cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW)
function (json_placeholders in out)
- string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" in "${in}")
+ string(REPLACE "<CONFIG>" "${CXXModules_config}" in "${in}")
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
- string(REPLACE "<CONFIG_DIR>" "${CMAKE_BUILD_TYPE}/" in "${in}")
+ string(REPLACE "<CONFIG_DIR>" "/${CXXModules_config}" in "${in}")
else ()
string(REPLACE "<CONFIG_DIR>" "" in "${in}")
endif ()
if (CMAKE_BUILD_TYPE)
- string(REPLACE "<CONFIG_FORCE>" "${CMAKE_BUILD_TYPE}" in "${in}")
+ string(REPLACE "<CONFIG_FORCE>" "${CXXModules_config}" in "${in}")
else ()
string(REPLACE "<CONFIG_FORCE>" "noconfig" in "${in}")
endif ()
string(REPLACE "<SOURCE_DIR>" "${RunCMake_SOURCE_DIR}" in "${in}")
string(REPLACE "<BINARY_DIR>" "${RunCMake_TEST_BINARY_DIR}" in "${in}")
+ string(REPLACE "<OBJEXT>" "${CMAKE_CXX_OUTPUT_EXTENSION}" in "${in}")
set("${out}" "${in}" PARENT_SCOPE)
endfunction ()
@@ -22,6 +23,7 @@ function (check_json_value path actual_type expect_type actual_value expect_valu
if (NOT actual_type STREQUAL expect_type)
list(APPEND RunCMake_TEST_FAILED
"Type mismatch at ${path}: ${actual_type} vs. ${expect_type}")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
return ()
endif ()
@@ -53,6 +55,8 @@ function (check_json_value path actual_type expect_type actual_value expect_valu
elseif (actual_type STREQUAL OBJECT)
check_json_object("${path}" "${actual_value}" "${expect_value}")
endif ()
+
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
endfunction ()
# Check that two arrays are the same.
@@ -82,6 +86,8 @@ function (check_json_array path actual expect)
string(JSON expect_value GET "${expect}" "${idx}")
check_json_value("${new_path}" "${actual_type}" "${expect_type}" "${actual_value}" "${expect_value}")
endforeach ()
+
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
endfunction ()
# Check that two inner objects are the same.
@@ -131,12 +137,12 @@ function (check_json_object path actual expect)
if (actual_keys_missed)
string(REPLACE ";" ", " actual_keys_missed_text "${actual_keys_missed}")
list(APPEND RunCMake_TEST_FAILED
- "Missing expected members at ${path}: ${actual_keys_missed_text}")
+ "Extra unexpected members at ${path}: ${actual_keys_missed_text}")
endif ()
if (expect_keys_missed)
string(REPLACE ";" ", " expect_keys_missed_text "${expect_keys_missed}")
list(APPEND RunCMake_TEST_FAILED
- "Extra unexpected members at ${path}: ${expect_keys_missed_text}")
+ "Missing expected members at ${path}: ${expect_keys_missed_text}")
endif ()
foreach (key IN LISTS common_keys)
@@ -148,13 +154,15 @@ function (check_json_object path actual expect)
string(JSON expect_value GET "${expect}" "${key}")
check_json_value("${new_path}" "${actual_type}" "${expect_type}" "${actual_value}" "${expect_value}")
endforeach ()
+
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
endfunction ()
# Check that two JSON objects are the same.
function (check_json actual expect)
check_json_object("" "${actual}" "${expect}")
-endfunction ()
-string(REPLACE ";" "; " RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}")
+ set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE)
+endfunction ()
cmake_policy(POP)
diff --git a/Tests/RunCMake/CXXModules/compiler_introspection.cmake b/Tests/RunCMake/CXXModules/compiler_introspection.cmake
index 0e61383..8c74940 100644
--- a/Tests/RunCMake/CXXModules/compiler_introspection.cmake
+++ b/Tests/RunCMake/CXXModules/compiler_introspection.cmake
@@ -21,6 +21,8 @@ set(CMAKE_CXX_COMPILE_FEATURES \"${CMAKE_CXX_COMPILE_FEATURES}\")
set(CMAKE_MAKE_PROGRAM \"${CMAKE_MAKE_PROGRAM}\")
set(forced_cxx_standard \"${forced_cxx_standard}\")
set(CMAKE_CXX_COMPILER_VERSION \"${CMAKE_CXX_COMPILER_VERSION}\")
+set(CMAKE_CXX_OUTPUT_EXTENSION \"${CMAKE_CXX_OUTPUT_EXTENSION}\")
+set(CXXModules_default_build_type \"${CMAKE_BUILD_TYPE}\")
")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/info.cmake" "${info}")
diff --git a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-private.json b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-private.json
index 65f0759..45b0396 100644
--- a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-private.json
+++ b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-private.json
@@ -6,9 +6,12 @@
"script-location": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-private.dir/install-cxx-module-bmi-<CONFIG_FORCE>.cmake"
},
"compiler-id": "<IGNORE>",
+ "compiler-frontend-variant": "<IGNORE>",
+ "compiler-simulate-id": "<IGNORE>",
"config": "<CONFIG>",
"cxx-modules": {
- "CMakeFiles/ninja-bmi-install-private.dir/sources/module-internal-part.cxx.o": {
+ "CMakeFiles/ninja-bmi-install-private.dir<CONFIG_DIR>/sources/module-internal-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "internal_partitions",
"relative-directory": "sources",
@@ -16,7 +19,8 @@
"type": "CXX_MODULES",
"visibility": "PRIVATE"
},
- "CMakeFiles/ninja-bmi-install-private.dir/sources/module-part.cxx.o": {
+ "CMakeFiles/ninja-bmi-install-private.dir<CONFIG_DIR>/sources/module-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "modules",
"relative-directory": "",
@@ -24,7 +28,8 @@
"type": "CXX_MODULES",
"visibility": "PRIVATE"
},
- "CMakeFiles/ninja-bmi-install-private.dir/sources/module.cxx.o": {
+ "CMakeFiles/ninja-bmi-install-private.dir<CONFIG_DIR>/sources/module.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "modules",
"relative-directory": "",
@@ -41,5 +46,5 @@
"include-dirs": [],
"language": "CXX",
"linked-target-dirs": [],
- "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-private.dir"
+ "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-private.dir<CONFIG_DIR>"
}
diff --git a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-public.json b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-public.json
index 9c8a895..30b55e3 100644
--- a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-public.json
+++ b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoBMIInstall-public.json
@@ -3,12 +3,15 @@
"destination": "lib/cxx/modules/<CONFIG>",
"message-level": "",
"permissions": "",
- "script-location": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-public.dir/install-cxx-module-bmi-noconfig.cmake"
+ "script-location": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-public.dir/install-cxx-module-bmi-<CONFIG_FORCE>.cmake"
},
"compiler-id": "<IGNORE>",
+ "compiler-frontend-variant": "<IGNORE>",
+ "compiler-simulate-id": "<IGNORE>",
"config": "<CONFIG>",
"cxx-modules": {
- "CMakeFiles/ninja-bmi-install-public.dir/sources/module-internal-part.cxx.o": {
+ "CMakeFiles/ninja-bmi-install-public.dir<CONFIG_DIR>/sources/module-internal-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx/internals",
"name": "internal_partitions",
"relative-directory": "sources",
@@ -16,7 +19,8 @@
"type": "CXX_MODULES",
"visibility": "PUBLIC"
},
- "CMakeFiles/ninja-bmi-install-public.dir/sources/module-part.cxx.o": {
+ "CMakeFiles/ninja-bmi-install-public.dir<CONFIG_DIR>/sources/module-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx",
"name": "modules",
"relative-directory": "",
@@ -24,7 +28,8 @@
"type": "CXX_MODULES",
"visibility": "PUBLIC"
},
- "CMakeFiles/ninja-bmi-install-public.dir/sources/module.cxx.o": {
+ "CMakeFiles/ninja-bmi-install-public.dir<CONFIG_DIR>/sources/module.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx",
"name": "modules",
"relative-directory": "",
@@ -41,5 +46,5 @@
"include-dirs": [],
"language": "CXX",
"linked-target-dirs": [],
- "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-public.dir"
+ "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-bmi-install-public.dir<CONFIG_DIR>"
}
diff --git a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-private.json b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-private.json
index 0545981..f06a846 100644
--- a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-private.json
+++ b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-private.json
@@ -1,9 +1,12 @@
{
"bmi-installation": null,
"compiler-id": "<IGNORE>",
+ "compiler-frontend-variant": "<IGNORE>",
+ "compiler-simulate-id": "<IGNORE>",
"config": "<CONFIG>",
"cxx-modules": {
- "CMakeFiles/ninja-exports-private.dir/sources/module-internal-part.cxx.o": {
+ "CMakeFiles/ninja-exports-private.dir<CONFIG_DIR>/sources/module-internal-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "internal_partitions",
"relative-directory": "sources",
@@ -11,7 +14,8 @@
"type": "CXX_MODULES",
"visibility": "PRIVATE"
},
- "CMakeFiles/ninja-exports-private.dir/sources/module-part.cxx.o": {
+ "CMakeFiles/ninja-exports-private.dir<CONFIG_DIR>/sources/module-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "modules",
"relative-directory": "",
@@ -19,7 +23,8 @@
"type": "CXX_MODULES",
"visibility": "PRIVATE"
},
- "CMakeFiles/ninja-exports-private.dir/sources/module.cxx.o": {
+ "CMakeFiles/ninja-exports-private.dir<CONFIG_DIR>/sources/module.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "modules",
"relative-directory": "",
@@ -69,5 +74,5 @@
"include-dirs": [],
"language": "CXX",
"linked-target-dirs": [],
- "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-exports-private.dir"
+ "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-exports-private.dir<CONFIG_DIR>"
}
diff --git a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-public.json b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-public.json
index adc3ae3..938481c 100644
--- a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-public.json
+++ b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoExport-public.json
@@ -1,9 +1,12 @@
{
"bmi-installation": null,
"compiler-id": "<IGNORE>",
+ "compiler-frontend-variant": "<IGNORE>",
+ "compiler-simulate-id": "<IGNORE>",
"config": "<CONFIG>",
"cxx-modules": {
- "CMakeFiles/ninja-exports-public.dir/sources/module-internal-part.cxx.o": {
+ "CMakeFiles/ninja-exports-public.dir<CONFIG_DIR>/sources/module-internal-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx/internals",
"name": "internal_partitions",
"relative-directory": "sources",
@@ -11,7 +14,8 @@
"type": "CXX_MODULES",
"visibility": "PUBLIC"
},
- "CMakeFiles/ninja-exports-public.dir/sources/module-part.cxx.o": {
+ "CMakeFiles/ninja-exports-public.dir<CONFIG_DIR>/sources/module-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx",
"name": "modules",
"relative-directory": "",
@@ -19,7 +23,8 @@
"type": "CXX_MODULES",
"visibility": "PUBLIC"
},
- "CMakeFiles/ninja-exports-public.dir/sources/module.cxx.o": {
+ "CMakeFiles/ninja-exports-public.dir<CONFIG_DIR>/sources/module.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx",
"name": "modules",
"relative-directory": "",
@@ -69,5 +74,5 @@
"include-dirs": [],
"language": "CXX",
"linked-target-dirs": [],
- "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-exports-public.dir"
+ "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-exports-public.dir<CONFIG_DIR>"
}
diff --git a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-private.json b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-private.json
index 9ba6568..3a66a94 100644
--- a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-private.json
+++ b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-private.json
@@ -1,9 +1,12 @@
{
"bmi-installation": null,
"compiler-id": "<IGNORE>",
+ "compiler-frontend-variant": "<IGNORE>",
+ "compiler-simulate-id": "<IGNORE>",
"config": "<CONFIG>",
"cxx-modules": {
- "CMakeFiles/ninja-file-sets-private.dir/sources/module-internal-part.cxx.o": {
+ "CMakeFiles/ninja-file-sets-private.dir<CONFIG_DIR>/sources/module-internal-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "internal_partitions",
"relative-directory": "sources",
@@ -11,7 +14,8 @@
"type": "CXX_MODULES",
"visibility": "PRIVATE"
},
- "CMakeFiles/ninja-file-sets-private.dir/sources/module-part.cxx.o": {
+ "CMakeFiles/ninja-file-sets-private.dir<CONFIG_DIR>/sources/module-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "modules",
"relative-directory": "",
@@ -19,7 +23,8 @@
"type": "CXX_MODULES",
"visibility": "PRIVATE"
},
- "CMakeFiles/ninja-file-sets-private.dir/sources/module.cxx.o": {
+ "CMakeFiles/ninja-file-sets-private.dir<CONFIG_DIR>/sources/module.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": null,
"name": "modules",
"relative-directory": "",
@@ -36,5 +41,5 @@
"include-dirs": [],
"language": "CXX",
"linked-target-dirs": [],
- "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-file-sets-private.dir"
+ "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-file-sets-private.dir<CONFIG_DIR>"
}
diff --git a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-public.json b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-public.json
index 46e2cbf..ac06c0f 100644
--- a/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-public.json
+++ b/Tests/RunCMake/CXXModules/expect/NinjaDependInfoFileSet-public.json
@@ -1,9 +1,12 @@
{
"bmi-installation": null,
"compiler-id": "<IGNORE>",
+ "compiler-frontend-variant": "<IGNORE>",
+ "compiler-simulate-id": "<IGNORE>",
"config": "<CONFIG>",
"cxx-modules": {
- "CMakeFiles/ninja-file-sets-public.dir/<CONFIG_DIR>sources/module-internal-part.cxx.o": {
+ "CMakeFiles/ninja-file-sets-public.dir<CONFIG_DIR>/sources/module-internal-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx/internals",
"name": "internal_partitions",
"relative-directory": "sources",
@@ -11,7 +14,8 @@
"type": "CXX_MODULES",
"visibility": "PUBLIC"
},
- "CMakeFiles/ninja-file-sets-public.dir/<CONFIG_DIR>sources/module-part.cxx.o": {
+ "CMakeFiles/ninja-file-sets-public.dir<CONFIG_DIR>/sources/module-part.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx",
"name": "modules",
"relative-directory": "",
@@ -19,7 +23,8 @@
"type": "CXX_MODULES",
"visibility": "PUBLIC"
},
- "CMakeFiles/ninja-file-sets-public.dir/<CONFIG_DIR>sources/module.cxx.o": {
+ "CMakeFiles/ninja-file-sets-public.dir<CONFIG_DIR>/sources/module.cxx<OBJEXT>": {
+ "bmi-only": false,
"destination": "lib/cxx",
"name": "modules",
"relative-directory": "",
@@ -36,5 +41,5 @@
"include-dirs": [],
"language": "CXX",
"linked-target-dirs": [],
- "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-file-sets-public.dir"
+ "module-dir": "<BINARY_DIR>/CMakeFiles/ninja-file-sets-public.dir<CONFIG_DIR>"
}