summaryrefslogtreecommitdiffstats
path: root/Source/cmBuildCommand.cxx
diff options
context:
space:
mode:
authorfriendlyanon <friendlyanon_@hotmail.com>2021-05-01 14:10:21 (GMT)
committerfriendlyanon <friendlyanon_@hotmail.com>2021-05-04 18:17:17 (GMT)
commitfc2ac460435df289149e4faaf494e6b287071a8c (patch)
tree6b08af5df9a9f1f3fe1fd90f54a220118a1e9301 /Source/cmBuildCommand.cxx
parent4dd4e9dd6ce5efd9bb9bbb784816167a8b5873ae (diff)
downloadCMake-fc2ac460435df289149e4faaf494e6b287071a8c.zip
CMake-fc2ac460435df289149e4faaf494e6b287071a8c.tar.gz
CMake-fc2ac460435df289149e4faaf494e6b287071a8c.tar.bz2
build_command: Add the PARALLEL_LEVEL argument
Issue: #19712
Diffstat (limited to 'Source/cmBuildCommand.cxx')
-rw-r--r--Source/cmBuildCommand.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmBuildCommand.cxx b/Source/cmBuildCommand.cxx
index 4830343..56b080a 100644
--- a/Source/cmBuildCommand.cxx
+++ b/Source/cmBuildCommand.cxx
@@ -28,12 +28,14 @@ bool MainSignature(std::vector<std::string> const& args,
std::string configuration;
std::string project_name;
std::string target;
+ std::string parallel;
enum Doing
{
DoingNone,
DoingConfiguration,
DoingProjectName,
- DoingTarget
+ DoingTarget,
+ DoingParallel
};
Doing doing = DoingNone;
for (unsigned int i = 1; i < args.size(); ++i) {
@@ -43,6 +45,8 @@ bool MainSignature(std::vector<std::string> const& args,
doing = DoingProjectName;
} else if (args[i] == "TARGET") {
doing = DoingTarget;
+ } else if (args[i] == "PARALLEL_LEVEL") {
+ doing = DoingParallel;
} else if (doing == DoingConfiguration) {
doing = DoingNone;
configuration = args[i];
@@ -52,6 +56,9 @@ bool MainSignature(std::vector<std::string> const& args,
} else if (doing == DoingTarget) {
doing = DoingNone;
target = args[i];
+ } else if (doing == DoingParallel) {
+ doing = DoingNone;
+ parallel = args[i];
} else {
status.SetError(cmStrCat("unknown argument \"", args[i], "\""));
return false;
@@ -77,7 +84,7 @@ bool MainSignature(std::vector<std::string> const& args,
}
std::string makecommand = mf.GetGlobalGenerator()->GenerateCMakeBuildCommand(
- target, configuration, "", "", mf.IgnoreErrorsCMP0061());
+ target, configuration, parallel, "", mf.IgnoreErrorsCMP0061());
mf.AddDefinition(variable, makecommand);