diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2024-04-10 13:12:24 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2024-04-12 15:46:39 (GMT) |
commit | 15bbd1d9b890645f3786f1b24d0d7651cbc2e807 (patch) | |
tree | 20aca1382019ac51f81c2a499b12bcf1ead89998 /Source/cmGeneratorTarget.cxx | |
parent | f80c60df02854b9443a0f73770d2ef7a1bcd72d5 (diff) | |
download | CMake-15bbd1d9b890645f3786f1b24d0d7651cbc2e807.zip CMake-15bbd1d9b890645f3786f1b24d0d7651cbc2e807.tar.gz CMake-15bbd1d9b890645f3786f1b24d0d7651cbc2e807.tar.bz2 |
Experimental: add an experimental feature gate for `import std`
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 1dba976..be82099 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -32,6 +32,7 @@ #include "cmCustomCommandGenerator.h" #include "cmCxxModuleUsageEffects.h" #include "cmEvaluatedTargetProperty.h" +#include "cmExperimental.h" #include "cmFileSet.h" #include "cmFileTimes.h" #include "cmGeneratedFileStream.h" @@ -8502,6 +8503,14 @@ bool cmGeneratorTarget::ApplyCXXStdTargets() break; } + // Check the experimental feature here as well. A toolchain may have + // provided the target and skipped the check in the toolchain preparation + // logic. + if (!cmExperimental::HasSupportEnabled( + *this->Makefile, cmExperimental::Feature::CxxImportStd)) { + break; + } + this->Target->AppendProperty( "LINK_LIBRARIES", cmStrCat("$<BUILD_LOCAL_INTERFACE:$<$<CONFIG:", config, ">:", targetName, |