Merge topic 'import-std-refactor'

42d2d63235 c++modules: Copy props from BMI consumers more correctly
6d3e9d8220 c++modules: single import std target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Reviewed-by: Ben Boeckel <ben.boeckel@kitware.com>
Merge-request: !12193
This commit is contained in:
Brad King
2026-06-22 18:21:02 -04:00
committed by Kitware Robot
38 changed files with 213 additions and 246 deletions
+1 -1
View File
@@ -66,7 +66,7 @@ In order to activate support for ``import std`` in C++23 and newer targets,
set
* variable ``CMAKE_EXPERIMENTAL_CXX_IMPORT_STD`` to
* value ``451f2fe2-a8a2-47c3-bc32-94786d8fc91b``.
* value ``f35a9ac6-8463-4d38-8eec-5d6008153e7d``.
This UUID may change in future versions of CMake. Be sure to use the value
documented here by the source tree of the version of CMake with which you are
+1 -1
View File
@@ -158,7 +158,7 @@ function(cmake_determine_compiler_support lang)
foreach(_cmake_import_std_version IN ITEMS 23 26)
if(CMAKE_CXX${_cmake_import_std_version}_COMPILE_FEATURES)
# Modules JSON covers all versions, otherwise rely on toolchain targets
if(CMAKE_CXX_STDLIB_MODULES_JSON OR (TARGET "__CMAKE:CXX${_cmake_import_std_version}"))
if(CMAKE_CXX_STDLIB_MODULES_JSON)
list(APPEND CMAKE_CXX_COMPILER_IMPORT_STD ${_cmake_import_std_version})
endif()
endif()
+29 -5
View File
@@ -12,6 +12,8 @@
#include "cmGeneratorTarget.h"
#include "cmListFileCache.h"
#include "cmMakefile.h"
#include "cmRange.h"
#include "cmStringAlgorithms.h"
#include "cmTarget.h"
#include "cmValue.h"
@@ -96,10 +98,17 @@ FlagFilter GetFlagFilter(cmGeneratorTarget const* gt)
return filter;
}
void AppendUsage(std::string& usageHashInput, std::string const& entry)
{
usageHashInput += entry;
usageHashInput.push_back('\0');
}
template <typename Range>
void AppendUsageEntries(std::string& usageHashInput, Range const& entries)
{
std::vector<std::string> entryValues;
entryValues.reserve(entries.size());
for (auto const& entry : entries) {
entryValues.push_back(entry.Value);
}
@@ -114,7 +123,8 @@ void AppendUsageEntries(std::string& usageHashInput, Range const& entries)
}
}
cmCxxModuleUsageEffects::cmCxxModuleUsageEffects(cmGeneratorTarget const* gt)
cmCxxModuleUsageEffects::cmCxxModuleUsageEffects(cmGeneratorTarget const* gt,
std::string const& config)
{
auto const* tgt = gt->Target;
auto const filter = GetFlagFilter(gt);
@@ -128,11 +138,25 @@ cmCxxModuleUsageEffects::cmCxxModuleUsageEffects(cmGeneratorTarget const* gt)
tgt->GetImportedCxxModulesCompileOptionsEntries().filter(
[&](const BT<std::string>& flag) { return !filter(flag.Value); }));
} else {
AppendUsageEntries(usageHashInput, tgt->GetCompileFeaturesEntries());
AppendUsageEntries(
AppendUsageEntries(usageHashInput,
cmMakeRange(gt->GetCompileOptions(config, "CXX"))
.filter([&](const BT<std::string>& flag) {
return !filter(flag.Value);
}));
cmValue langStd = gt->GetLanguageStandard("CXX", config);
if (!langStd) {
langStd = gt->Makefile->GetDefinition("CMAKE_CXX_STANDARD_DEFAULT");
}
AppendUsage(usageHashInput,
cmStrCat("CXX_STANDARD:", langStd ? *langStd : "20"));
AppendUsage(
usageHashInput,
tgt->GetCompileOptionsEntries().filter(
[&](const BT<std::string>& flag) { return !filter(flag.Value); }));
cmStrCat("CXX_EXTENSIONS:", *gt->GetLanguageExtensions("CXX")));
AppendUsage(
usageHashInput,
cmStrCat("CXX_STANDARD_REQUIRED:",
gt->GetLanguageStandardRequired("CXX") ? "TRUE" : "FALSE"));
}
cmCryptoHash hasher(cmCryptoHash::AlgoSHA3_512);
+2 -1
View File
@@ -11,7 +11,8 @@ class cmGeneratorTarget;
class cmCxxModuleUsageEffects
{
public:
cmCxxModuleUsageEffects(cmGeneratorTarget const* gt);
cmCxxModuleUsageEffects(cmGeneratorTarget const* gt,
std::string const& config);
std::string const& GetHash() const;
private:
+1 -1
View File
@@ -31,7 +31,7 @@ cmExperimental::FeatureData const LookupTable[] = {
cmExperimental::TryCompileCondition::Always },
// CxxImportStd
{ "CxxImportStd",
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b",
"f35a9ac6-8463-4d38-8eec-5d6008153e7d",
"CMAKE_EXPERIMENTAL_CXX_IMPORT_STD",
"CMake's support for `import std;` in C++23 and newer is experimental. It "
"is meant only for experimentation and feedback to CMake developers.",
+34 -51
View File
@@ -5330,8 +5330,6 @@ bool cmGeneratorTarget::IsNullImpliedByLinkLibraries(
namespace {
bool CreateCxxStdlibTarget(cmMakefile* makefile, cmLocalGenerator* lg,
std::string const& targetName,
std::string const& cxxTargetName,
std::string const& stdLevel,
std::vector<std::string> const& configs)
{
#ifndef CMAKE_BOOTSTRAP
@@ -5377,20 +5375,17 @@ bool CreateCxxStdlibTarget(cmMakefile* makefile, cmLocalGenerator* lg,
metadata = std::move(*parseResult.Meta);
}
auto const localTargetName = cmStrCat("__cmake_cxx_std_", stdLevel);
cmStandardLevelResolver standardResolver(makefile);
auto* stdlibTgt = makefile->AddLibrary(
localTargetName, cmStateEnums::STATIC_LIBRARY, {}, true);
"@cmake_cxx_std", cmStateEnums::STATIC_LIBRARY, {}, true);
cmCxxModuleMetadata::PopulateTarget(*stdlibTgt, *metadata, configs);
standardResolver.AddRequiredTargetFeature(stdlibTgt,
cmStrCat("cxx_std_", stdLevel));
cmStandardLevelResolver standardResolver(makefile);
standardResolver.AddRequiredTargetFeature(stdlibTgt, "cxx_std_20");
auto gt = cm::make_unique<cmGeneratorTarget>(stdlibTgt, lg);
for (auto const& config : configs) {
gt->ComputeCompileFeatures(config);
}
lg->AddGeneratorTarget(std::move(gt));
makefile->AddAlias(cxxTargetName, localTargetName);
#endif // CMAKE_BOOTSTRAP
@@ -5398,11 +5393,8 @@ bool CreateCxxStdlibTarget(cmMakefile* makefile, cmLocalGenerator* lg,
}
} // namespace
bool cmGeneratorTarget::ApplyCXXStdTargets()
bool cmGeneratorTarget::ApplyCXXStdTarget()
{
cmStandardLevelResolver standardResolver(this->Makefile);
cmStandardLevel const cxxStd23 =
*standardResolver.LanguageStandardLevel("CXX", "23");
std::vector<std::string> const& configs =
this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig);
auto std_prop = this->GetProperty("CXX_MODULE_STD");
@@ -5466,35 +5458,18 @@ bool cmGeneratorTarget::ApplyCXXStdTargets()
return true;
}
for (auto const& config : configs) {
if (this->HaveCxxModuleSupport(config) != Cxx20SupportLevel::Supported) {
continue;
}
cm::optional<cmStandardLevel> explicitLevel =
this->GetExplicitStandardLevel("CXX", config);
if (!explicitLevel || *explicitLevel < cxxStd23) {
continue;
}
auto const stdLevel =
standardResolver.GetLevelString("CXX", *explicitLevel);
auto const cxxTargetName = cmStrCat("__CMAKE::CXX", stdLevel);
// Create the __CMAKE::CXX## target if it doesn't already exist
if (!this->Makefile->FindTargetToUse(cxxTargetName) &&
!CreateCxxStdlibTarget(this->Makefile, this->LocalGenerator,
this->GetName(), cxxTargetName, stdLevel,
configs)) {
return false;
}
this->Target->AppendProperty(
"LINK_LIBRARIES",
cmStrCat("$<BUILD_LOCAL_INTERFACE:$<$<CONFIG:", config,
">:", cxxTargetName, ">>"));
// Create the single, unreferenceable import std target if it doesn't
// already exist. BMI compatibility handles per-consumer standard level
// differences by creating synthetic targets as needed.
if (!this->Makefile->FindTargetToUse("@cmake_cxx_std") &&
!CreateCxxStdlibTarget(this->Makefile, this->LocalGenerator,
this->GetName(), configs)) {
return false;
}
this->Target->AppendProperty("LINK_LIBRARIES",
"$<BUILD_LOCAL_INTERFACE:@cmake_cxx_std>");
// Check the experimental feature here. A toolchain may have
// skipped the check in the toolchain preparation logic.
if (!cmExperimental::HasSupportEnabled(
@@ -5510,21 +5485,26 @@ bool cmGeneratorTarget::ApplyCXXStdTargets()
return true;
}
cmCxxModuleUsageEffects const& cmGeneratorTarget::GetCxxModuleUsageEffects()
const
cmCxxModuleUsageEffects const& cmGeneratorTarget::GetCxxModuleUsageEffects(
std::string const& config) const
{
if (!this->CxxModuleUsageEffects) {
this->CxxModuleUsageEffects.emplace(this);
auto iter = this->CxxModuleUsageEffects.find(config);
if (iter == this->CxxModuleUsageEffects.end()) {
auto result = this->CxxModuleUsageEffects.emplace(
std::pair<std::string, cmCxxModuleUsageEffects>{
config, cmCxxModuleUsageEffects(this, config) });
return result.first->second;
}
return *this->CxxModuleUsageEffects;
return iter->second;
}
cmGeneratorTarget const* cmGeneratorTarget::GetTargetForCxxModules(
std::string const& config, cmGeneratorTarget const& bmiConsumer) const
{
auto const& consumingUsage = bmiConsumer.GetCxxModuleUsageEffects();
auto const& owningUsage = this->GetCxxModuleUsageEffects();
auto const& consumingUsage = bmiConsumer.GetCxxModuleUsageEffects(config);
auto const& owningUsage = this->GetCxxModuleUsageEffects(config);
if (consumingUsage.GetHash() == owningUsage.GetHash()) {
if (this->IsImported()) {
return this->GetCxxSyntheticTarget(config, *this);
@@ -5538,7 +5518,8 @@ cmGeneratorTarget const* cmGeneratorTarget::GetTargetForCxxModules(
cmGeneratorTarget const* cmGeneratorTarget::GetCxxSyntheticTarget(
std::string const& config, cmGeneratorTarget const& bmiConsumer) const
{
auto const& usageHash = bmiConsumer.GetCxxModuleUsageEffects().GetHash();
auto const& usageHash =
bmiConsumer.GetCxxModuleUsageEffects(config).GetHash();
auto cached = this->SynthCxxTargets.find(usageHash);
if (cached != this->SynthCxxTargets.end()) {
return cached->second;
@@ -5577,8 +5558,10 @@ cmGeneratorTarget const* cmGeneratorTarget::GetCxxSyntheticTarget(
}
}
// Copy properties which effect consumer compatibility
tgt->CopyUsageEffects(bmiConsumer.Target);
// Copy properties which effect consumer compatibility.
// CopyUsageEffects now uses the consumer's full (own + transitive)
// compile features and options.
tgt->CopyUsageEffects(&bmiConsumer, config);
// Copy properties which don't effect consumer compatibility
tgt->CopyCxxModulesEntries(model);
@@ -5599,9 +5582,9 @@ cmGeneratorTarget const* cmGeneratorTarget::GetCxxSyntheticTarget(
for (auto const& innerConfig : allConfigs) {
gtp->ComputeCompileFeatures(innerConfig);
}
// See `cmGlobalGenerator::ApplyCXXStdTargets` in
// See `cmGlobalGenerator::ApplyCXXStdTarget` in
// `cmGlobalGenerator::Compute` for non-synthetic target resolutions.
if (!gtp->ApplyCXXStdTargets()) {
if (!gtp->ApplyCXXStdTarget()) {
return nullptr;
}
+4 -3
View File
@@ -1146,8 +1146,9 @@ public:
std::string GetImportedXcFrameworkPath(std::string const& config) const;
bool ApplyCXXStdTargets();
cmCxxModuleUsageEffects const& GetCxxModuleUsageEffects() const;
bool ApplyCXXStdTarget();
cmCxxModuleUsageEffects const& GetCxxModuleUsageEffects(
std::string const& config) const;
cmGeneratorTarget const* GetTargetForCxxModules(
std::string const& config, cmGeneratorTarget const& bmiConsumer) const;
bool DiscoverSyntheticTargets(
@@ -1617,7 +1618,7 @@ private:
std::map<cmSourceFile const*, ClassifiedFlags> SourceFlags;
};
mutable std::map<std::string, cmGeneratorTarget*> SynthCxxTargets;
mutable cm::optional<cmCxxModuleUsageEffects> CxxModuleUsageEffects;
mutable std::map<std::string, cmCxxModuleUsageEffects> CxxModuleUsageEffects;
mutable std::map<std::string, InfoByConfig> Configs;
std::unique_ptr<cmGeneratorFileSets> FileSets;
bool PchReused = false;
+7 -8
View File
@@ -1677,13 +1677,12 @@ bool cmGlobalGenerator::Compute()
}
}
// We now have all targets set up and std levels constructed. Add
// `__CMAKE::CXX*` targets as link dependencies to all targets which need
// them.
// We now have all targets set up. Add the `@cmake_cxx_std` target as a link
// dependency to all targets which need it.
//
// Synthetic targets performed this inside of
// `cmLocalGenerator::DiscoverSyntheticTargets`
if (!this->ApplyCXXStdTargets()) {
if (!this->ApplyCXXStdTarget()) {
return false;
}
@@ -2002,12 +2001,12 @@ void cmGlobalGenerator::ComputeTargetOrder(cmGeneratorTarget const* gt,
entry->second = index++;
}
bool cmGlobalGenerator::ApplyCXXStdTargets()
bool cmGlobalGenerator::ApplyCXXStdTarget()
{
for (auto const& gen : this->LocalGenerators) {
// tgt->ApplyCXXStd can create targets itself, so we need iterators which
// won't be invalidated by that target creation
// tgt->ApplyCXXStdTarget can create a target itself, so we need iterators
// which won't be invalidated by that target creation
auto const& genTgts = gen->GetGeneratorTargets();
std::vector<cmGeneratorTarget*> existingTgts;
existingTgts.reserve(genTgts.size());
@@ -2016,7 +2015,7 @@ bool cmGlobalGenerator::ApplyCXXStdTargets()
}
for (auto const& tgt : existingTgts) {
if (!tgt->ApplyCXXStdTargets()) {
if (!tgt->ApplyCXXStdTarget()) {
return false;
}
}
+1 -1
View File
@@ -800,7 +800,7 @@ protected:
virtual bool CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const;
bool ApplyCXXStdTargets();
bool ApplyCXXStdTarget();
bool DiscoverSyntheticTargets();
bool AddHeaderSetVerification();
+30 -17
View File
@@ -25,6 +25,7 @@
#include "cmFileSetMetadata.h"
#include "cmFindPackageStack.h"
#include "cmGeneratorExpression.h"
#include "cmGeneratorTarget.h"
#include "cmGlobalGenerator.h"
#include "cmList.h"
#include "cmListFileCache.h"
@@ -595,6 +596,16 @@ TargetProperty const StaticTargetProperties[] = {
#undef COMMON_LANGUAGE_PROPERTIES
#undef IC
#undef R
cmValue copyProperty(cmTarget const* src, cmTarget* dst,
std::string const& prop)
{
cmValue value = src->GetProperty(prop);
// Always set the property; it may have been explicitly unset.
dst->SetProperty(prop, value);
return value;
};
}
class cmTargetInternals
@@ -1739,12 +1750,16 @@ cmBTStringRange cmTarget::GetLinkInterfaceDirectExcludeEntries() const
return cmMakeRange(this->impl->InterfaceLinkLibrariesDirectExclude.Entries);
}
void cmTarget::CopyUsageEffects(cmTarget const* tgt)
void cmTarget::CopyUsageEffects(cmGeneratorTarget const* gt,
std::string const& config)
{
// Normal targets cannot be the target of a copy.
assert(!this->IsNormal());
// Imported targets cannot be the target of a copy.
assert(!this->IsImported());
auto const* tgt = gt->Target;
// Only imported or normal targets can be the source of a copy.
assert(tgt->IsImported() || tgt->IsNormal());
@@ -1758,10 +1773,17 @@ void cmTarget::CopyUsageEffects(cmTarget const* tgt)
cmMakeRange(tgt->impl->ImportedCxxModulesCompileOptions.Entries));
} else {
this->impl->CompileFeatures.CopyFromEntries(
cmMakeRange(tgt->impl->CompileFeatures.Entries));
cmMakeRange(gt->GetCompileFeatures(config)));
this->impl->CompileOptions.CopyFromEntries(
cmMakeRange(tgt->impl->CompileOptions.Entries));
cmMakeRange(gt->GetCompileOptions(config, "CXX")));
}
cmValue langStd = gt->GetLanguageStandard("CXX", config);
if (langStd) {
this->SetProperty("CXX_STANDARD", *langStd);
}
copyProperty(tgt, this, "CXX_EXTENSIONS");
copyProperty(tgt, this, "CXX_STANDARD_REQUIRED");
}
void cmTarget::CopyPolicyStatuses(cmTarget const* tgt)
@@ -1857,9 +1879,6 @@ void cmTarget::CopyCxxModulesProperties(cmTarget const* tgt)
// -- Language
// ---- C++
"CXX_COMPILER_LAUNCHER",
"CXX_STANDARD",
"CXX_STANDARD_REQUIRED",
"CXX_EXTENSIONS",
"CXX_VISIBILITY_PRESET",
"CXX_MODULE_STD",
@@ -1896,15 +1915,8 @@ void cmTarget::CopyCxxModulesProperties(cmTarget const* tgt)
"SYSTEM",
};
auto copyProperty = [this, tgt](std::string const& prop) -> cmValue {
cmValue value = tgt->GetProperty(prop);
// Always set the property; it may have been explicitly unset.
this->SetProperty(prop, value);
return value;
};
for (auto const& prop : propertiesToCopy) {
copyProperty(prop);
copyProperty(tgt, this, prop);
}
static cm::static_string_view const perConfigPropertiesToCopy[] = {
@@ -1919,12 +1931,13 @@ void cmTarget::CopyCxxModulesProperties(cmTarget const* tgt)
for (std::string const& configName : configNames) {
std::string configUpper = cmSystemTools::UpperCase(configName);
for (auto const& perConfigProp : perConfigPropertiesToCopy) {
copyProperty(cmStrCat(perConfigProp, configUpper));
copyProperty(tgt, this, cmStrCat(perConfigProp, configUpper));
}
}
if (this->GetGlobalGenerator()->IsXcode()) {
cmValue xcodeGenerateScheme = copyProperty("XCODE_GENERATE_SCHEME");
cmValue xcodeGenerateScheme =
copyProperty(tgt, this, "XCODE_GENERATE_SCHEME");
// TODO: Make sure these show up on the imported target in the first place
// XCODE_ATTRIBUTE_???
@@ -1954,7 +1967,7 @@ void cmTarget::CopyCxxModulesProperties(cmTarget const* tgt)
};
for (auto const& xcodeProperty : xcodeSchemePropertiesToCopy) {
copyProperty(xcodeProperty);
copyProperty(tgt, this, xcodeProperty);
}
#endif
}
+3 -1
View File
@@ -32,6 +32,7 @@ enum class Visibility;
class cmCustomCommand;
class cmFileSet;
class cmFindPackageStack;
class cmGeneratorTarget;
class cmGlobalGenerator;
class cmInstallTargetGenerator;
class cmMakefile;
@@ -327,7 +328,8 @@ public:
cmBTStringRange GetLinkInterfaceDirectEntries() const;
cmBTStringRange GetLinkInterfaceDirectExcludeEntries() const;
void CopyUsageEffects(cmTarget const* tgt);
void CopyUsageEffects(cmGeneratorTarget const* gt,
std::string const& config);
void CopyPolicyStatuses(cmTarget const* tgt);
void CopyCxxModulesEntries(cmTarget const* tgt);
void CopyCxxModulesProperties(cmTarget const* tgt);
@@ -1,6 +1,3 @@
# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
enable_language(CXX)
unset(CMAKE_CXX_SCANDEP_SOURCE)
@@ -1,6 +1,3 @@
# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
enable_language(CXX)
unset(CMAKE_CXX_SCANDEP_SOURCE)
@@ -1,9 +1,6 @@
# Enable scanning by default for targets that explicitly use C++ 20.
cmake_policy(SET CMP0155 NEW)
# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
# Force CMAKE_CXX_STANDARD_DEFAULT to be C++ 20.
set(ENV{CXXFLAGS} "$ENV{CXXFLAGS} ${CMAKE_CXX20_STANDARD_COMPILE_OPTION}")
enable_language(CXX)
-16
View File
@@ -15,22 +15,6 @@ if (CMAKE_CXX_FLAGS MATCHES "-std=")
set(forced_cxx_standard 1)
endif ()
macro (cxx_check_import_std version)
set(have_cxx${version}_import_std 0)
if ("${version}" IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD)
set(have_cxx${version}_import_std 1)
endif ()
if (TARGET "__CMAKE:CXX${version}" AND NOT have_cxx${version}_import_std)
message(FATAL_ERROR
"The toolchain's C++${version} target exists, but the user variable does "
"not indicate it.")
endif ()
endmacro ()
cxx_check_import_std(23)
cxx_check_import_std(26)
# Forward information about the C++ compile features.
string(APPEND info "\
set(CMAKE_CXX_COMPILE_FEATURES \"${CMAKE_CXX_COMPILE_FEATURES}\")
-3
View File
@@ -1,6 +1,3 @@
# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
enable_language(CXX)
add_library(nocxx20)
@@ -1,9 +1,6 @@
# Enable scanning by default for targets that explicitly use C++ 20.
cmake_policy(SET CMP0155 NEW)
# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
enable_language(CXX)
# Hide any real scanning rule that may be available.
@@ -2,26 +2,7 @@ file(GLOB synth_dirs
"${RunCMake_TEST_BINARY_DIR}/CMakeFiles/depchain_with_modules_json_file@synth_*.dir")
list(LENGTH synth_dirs synth_dirs_len)
if (NOT synth_dirs_len EQUAL 1)
if (NOT synth_dirs_len EQUAL 0)
list(APPEND RunCMake_TEST_FAILED
"Expected exactly one synthetic target for consuming 'depchain_with_modules_json_file' but found ${synth_dirs_len}: ${synth_dirs}")
endif ()
list(GET synth_dirs 0 synth_dir)
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(dep_modules_json_path "CMakeFiles/depchain_modules_json_file.dir/Debug/CXX.dd")
set(modules_json_path "${synth_dir}/Debug/CXXModules.json")
else ()
set(dep_modules_json_path "CMakeFiles/depchain_modules_json_file.dir/CXX.dd")
set(modules_json_path "${synth_dir}/CXXModules.json")
endif ()
if ("${modules_json_path}" IS_NEWER_THAN "${RunCMake_TEST_BINARY_DIR}/${dep_modules_json_path}")
cmake_path(RELATIVE_PATH modules_json_path
BASE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
list(APPEND RunCMake_TEST_FAILED
"Object '${dep_modules_json_path}' should have recompiled if '${modules_json_path}' changed.")
"Expected no synthetic targets for consuming 'depchain_with_modules_json_file' but found ${synth_dirs_len}: ${synth_dirs}")
endif ()
@@ -275,9 +275,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/",
@@ -299,9 +299,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -318,9 +318,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -354,9 +354,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_OTHER_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_OTHER_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_OTHER_DIR>/",
@@ -378,9 +378,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_OTHER_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -397,9 +397,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_OTHER_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -436,8 +436,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/",
@@ -462,8 +462,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -483,8 +483,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -521,8 +521,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_OTHER_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_OTHER_DIR>/",
@@ -547,8 +547,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -568,8 +568,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -149,9 +149,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/",
@@ -173,9 +173,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -192,9 +192,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -231,8 +231,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/",
@@ -257,8 +257,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -278,8 +278,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -149,9 +149,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/",
@@ -173,9 +173,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -192,9 +192,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -231,8 +231,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/",
@@ -257,8 +257,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -278,8 +278,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -149,9 +149,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/",
@@ -173,9 +173,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -192,9 +192,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -231,8 +231,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/",
@@ -257,8 +257,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -278,8 +278,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -275,9 +275,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/",
@@ -299,9 +299,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -318,9 +318,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -354,9 +354,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_OTHER_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_OTHER_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_OTHER_DIR>/",
@@ -378,9 +378,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_OTHER_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -397,9 +397,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_OTHER_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -436,8 +436,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/",
@@ -462,8 +462,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -483,8 +483,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -521,8 +521,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_OTHER_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_OTHER_DIR>/",
@@ -547,8 +547,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -568,8 +568,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -149,9 +149,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_0.dir<CONFIG_DIR>/",
@@ -173,9 +173,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -192,9 +192,9 @@
"-Dfrom_cmake_cxx_flags",
"-Dfrom_cmake_cxx_<CONFIG_LOWER>_flags",
"<CXX20_OPTION>",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Dtarget_public_option"
"-Dtarget_public_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -231,8 +231,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option",
"-Ddep_interface_option",
"PATH:-Ddepflag=\"CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/.d\"",
"REGEX:<BMI_ONLY_FLAG>",
"PATH:<OUTPUT_FLAG>CMakeFiles/CXXModules__export_build_database@synth_1.dir<CONFIG_DIR>/",
@@ -257,8 +257,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"local-arguments": [
"-D_MBCS",
@@ -278,8 +278,8 @@
"-Dfrom_compile_options",
"-Dtarget_private_option",
"-Dtarget_public_option",
"-Ddep_interface_option",
"-Dtarget_interface_option"
"-Dtarget_interface_option",
"-Ddep_interface_option"
],
"private": false,
"provides": {
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
set(CMAKE_CXX_STDLIB_MODULES_JSON
"${CMAKE_CURRENT_LIST_DIR}/../dummy-std/manifest/dummy-std.modules.json"
)
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
project(cxx_modules_import_std_export_no_std CXX)
@@ -39,7 +39,7 @@ list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::")
# Strip quotes.
string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}")
if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets)
if ("@cmake_cxx_std" IN_LIST usage_dependent_targets)
message(SEND_ERROR
"The main export requires the '__CMAKE::CXX23' target")
"The main export requires the '@cmake_cxx_std' target")
endif ()
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
project(cxx_modules_import_std_export_no_std CXX)
@@ -39,7 +39,7 @@ list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::")
# Strip quotes.
string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}")
if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets)
if ("@cmake_cxx_std" IN_LIST usage_dependent_targets)
message(SEND_ERROR
"The main export requires the '__CMAKE::CXX23' target")
"The main export requires the '@cmake_cxx_std' target")
endif ()
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
project(cxx_modules_import_std_no_std_property CXX)
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
project(cxx_modules_import_std_not_in_export CXX)
@@ -39,7 +39,7 @@ list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::")
# Strip quotes.
string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}")
if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets)
if ("@cmake_cxx_std" IN_LIST usage_dependent_targets)
message(SEND_ERROR
"The main export requires the '__CMAKE::CXX23' target")
"The main export requires the '@cmake_cxx_std' target")
endif ()
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
project(cxx_modules_import_std_not_in_export CXX)
@@ -39,7 +39,7 @@ list(FILTER usage_dependent_targets EXCLUDE REGEX "CXXModules::")
# Strip quotes.
string(REPLACE "\"" "" usage_dependent_targets "${usage_dependent_targets}")
if ("__CMAKE::CXX23" IN_LIST usage_dependent_targets)
if ("@cmake_cxx_std" IN_LIST usage_dependent_targets)
message(SEND_ERROR
"The main export requires the '__CMAKE::CXX23' target")
"The main export requires the '@cmake_cxx_std' target")
endif ()
@@ -1,14 +1,8 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
if (EXPORT_NO_STD)
# Block making C++ `import std` targets.
add_library(__CMAKE::CXX23 IMPORTED INTERFACE)
add_library(__CMAKE::CXX26 IMPORTED INTERFACE)
endif ()
project(cxx_modules_import_std_transitive CXX)
include("${CMAKE_SOURCE_DIR}/../cxx-modules-rules.cmake")
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_minimum_required(VERSION 3.29)
project(cxx_modules_import_std CXX)
@@ -13,7 +13,7 @@ if (NOT feature_present STREQUAL "FALSE")
endif ()
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED
"CxxImportStd"
@@ -1,5 +1,5 @@
set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD
"451f2fe2-a8a2-47c3-bc32-94786d8fc91b")
"f35a9ac6-8463-4d38-8eec-5d6008153e7d")
cmake_language(GET_EXPERIMENTAL_FEATURE_ENABLED
"CxxImportStd"