diff options
Diffstat (limited to 'Source/cmInstallCommand.cxx')
-rw-r--r-- | Source/cmInstallCommand.cxx | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx index 1b47ec4..0fc4011 100644 --- a/Source/cmInstallCommand.cxx +++ b/Source/cmInstallCommand.cxx @@ -21,7 +21,6 @@ #include "cmArgumentParser.h" #include "cmArgumentParserTypes.h" #include "cmExecutionStatus.h" -#include "cmExperimental.h" #include "cmExportSet.h" #include "cmFileSet.h" #include "cmGeneratorExpression.h" @@ -491,6 +490,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args, publicHeaderArgs.Parse(argVectors.PublicHeader, &unknownArgs); resourceArgs.Parse(argVectors.Resource, &unknownArgs); includesArgs.Parse(&argVectors.Includes, &unknownArgs); + cxxModuleBmiArgs.Parse(argVectors.CxxModulesBmi, &unknownArgs); for (std::size_t i = 0; i < argVectors.FileSets.size(); i++) { // We have to create a separate object for the parsing because // cmArgumentParser<void>::Bind() binds to a specific address, but the @@ -501,15 +501,6 @@ bool HandleTargetsMode(std::vector<std::string> const& args, fileSetArgs[i] = std::move(fileSetArg); } - bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( - *helper.Makefile, cmExperimental::Feature::CxxModuleCMakeApi); - if (!supportCxx20FileSetTypes) { - std::copy(argVectors.CxxModulesBmi.begin(), argVectors.CxxModulesBmi.end(), - std::back_inserter(unknownArgs)); - } else { - cxxModuleBmiArgs.Parse(argVectors.CxxModulesBmi, &unknownArgs); - } - if (!unknownArgs.empty()) { // Unknown argument. status.SetError( @@ -541,12 +532,10 @@ bool HandleTargetsMode(std::vector<std::string> const& args, success = success && privateHeaderArgs.Finalize(); success = success && publicHeaderArgs.Finalize(); success = success && resourceArgs.Finalize(); + success = success && cxxModuleBmiArgs.Finalize(); for (auto& fileSetArg : fileSetArgs) { success = success && fileSetArg.Finalize(); } - if (supportCxx20FileSetTypes) { - success = success && cxxModuleBmiArgs.Finalize(); - } if (!success) { return false; @@ -1173,8 +1162,7 @@ bool HandleTargetsMode(std::vector<std::string> const& args, } } - if (supportCxx20FileSetTypes && - !cxxModuleBmiArgs.GetDestination().empty()) { + if (!cxxModuleBmiArgs.GetDestination().empty()) { cxxModuleBmiGenerator = cm::make_unique<cmInstallCxxModuleBmiGenerator>( target.GetName(), helper.GetCxxModulesBmiDestination(&cxxModuleBmiArgs), @@ -2071,12 +2059,7 @@ bool HandleExportMode(std::vector<std::string> const& args, ica.Bind("NAMESPACE"_s, name_space); ica.Bind("EXPORT_LINK_INTERFACE_LIBRARIES"_s, exportOld); ica.Bind("FILE"_s, filename); - - bool const supportCxx20FileSetTypes = cmExperimental::HasSupportEnabled( - *helper.Makefile, cmExperimental::Feature::CxxModuleCMakeApi); - if (supportCxx20FileSetTypes) { - ica.Bind("CXX_MODULES_DIRECTORY"_s, cxx_modules_directory); - } + ica.Bind("CXX_MODULES_DIRECTORY"_s, cxx_modules_directory); std::vector<std::string> unknownArgs; ica.Parse(args, &unknownArgs); |