diff options
author | Brad King <brad.king@kitware.com> | 2022-07-07 13:25:41 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-07-07 13:25:55 (GMT) |
commit | 4c50f639c7e67098eba14bc41869dd5c354d0da6 (patch) | |
tree | 2cde3af9ae3d18f67471933061c60cff81de6c8f /Source/cmExportCommand.cxx | |
parent | 18eeb51ebb32346e922b493df1c4a711f5e6a349 (diff) | |
parent | f62c3c3c729c635bca11f8d9c3fabd70fd3eab8f (diff) | |
download | CMake-4c50f639c7e67098eba14bc41869dd5c354d0da6.zip CMake-4c50f639c7e67098eba14bc41869dd5c354d0da6.tar.gz CMake-4c50f639c7e67098eba14bc41869dd5c354d0da6.tar.bz2 |
Merge topic 'cpp-named-module-export-infra'
f62c3c3c72 RunCMake/CXXModules: test public modules requiring private modules
c5d4dd713f RunCMake/CXXModules: add tests which export BMIs
4d55f1422e RunCMake/CXXModules: test installation of BMIs and interfaces
eff45f790d RunCMake/CXXModules: fix example follow-on case names
a87c39dad1 RunCMake/CXXModules: output example test output upon failure
727e3db07a RunCMake/CXXModules: append to the test options
f899563ae4 cmGlobalNinjaGenerator: verify that private sources stay private
9ecd3e771b cmGlobalNinjaGenerator: generate install rules for BMI files
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Acked-by: Alex <leha-bot@yandex.ru>
Merge-request: !7224
Diffstat (limited to 'Source/cmExportCommand.cxx')
-rw-r--r-- | Source/cmExportCommand.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmExportCommand.cxx b/Source/cmExportCommand.cxx index 198874e..4071f99 100644 --- a/Source/cmExportCommand.cxx +++ b/Source/cmExportCommand.cxx @@ -14,6 +14,7 @@ #include "cmArgumentParser.h" #include "cmExecutionStatus.h" +#include "cmExperimental.h" #include "cmExportBuildAndroidMKGenerator.h" #include "cmExportBuildFileGenerator.h" #include "cmExportSet.h" @@ -61,6 +62,7 @@ bool cmExportCommand(std::vector<std::string> const& args, std::string Namespace; std::string Filename; std::string AndroidMKFile; + std::string CxxModulesDirectory; bool Append = false; bool ExportOld = false; }; @@ -69,6 +71,12 @@ bool cmExportCommand(std::vector<std::string> const& args, .Bind("NAMESPACE"_s, &Arguments::Namespace) .Bind("FILE"_s, &Arguments::Filename); + bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( + status.GetMakefile(), cmExperimental::Feature::CxxModuleCMakeApi); + if (supportCxx20FileSetTypes) { + parser.Bind("CXX_MODULES_DIRECTORY"_s, &Arguments::CxxModulesDirectory); + } + if (args[0] == "EXPORT") { parser.Bind("EXPORT"_s, &Arguments::ExportSetName); } else { @@ -211,6 +219,7 @@ bool cmExportCommand(std::vector<std::string> const& args, } ebfg->SetExportFile(fname.c_str()); ebfg->SetNamespace(arguments.Namespace); + ebfg->SetCxxModuleDirectory(arguments.CxxModulesDirectory); ebfg->SetAppendMode(arguments.Append); if (exportSet != nullptr) { ebfg->SetExportSet(exportSet); |