summaryrefslogtreecommitdiffstats
path: root/Source/cmake.h
diff options
context:
space:
mode:
authorFlorian Maushart <FloriansGit@online.ms>2018-04-14 20:50:19 (GMT)
committerBrad King <brad.king@kitware.com>2018-05-25 13:42:20 (GMT)
commit1ab3881ec9e809ac5f6cad5cd84048310b8683e2 (patch)
tree2b5c7c5a9ad2e38a584de50b5f019056883c3877 /Source/cmake.h
parentdfc692342831186053bd385605c8a21239e2e77d (diff)
downloadCMake-1ab3881ec9e809ac5f6cad5cd84048310b8683e2.zip
CMake-1ab3881ec9e809ac5f6cad5cd84048310b8683e2.tar.gz
CMake-1ab3881ec9e809ac5f6cad5cd84048310b8683e2.tar.bz2
cmake: Add options for parallel builds to --build mode
While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
Diffstat (limited to 'Source/cmake.h')
-rw-r--r--Source/cmake.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmake.h b/Source/cmake.h
index 63dbe9f..6c0d77c 100644
--- a/Source/cmake.h
+++ b/Source/cmake.h
@@ -119,6 +119,9 @@ public:
typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;
+ static const int NO_BUILD_PARALLEL_LEVEL = -1;
+ static const int DEFAULT_BUILD_PARALLEL_LEVEL = 0;
+
/// Default constructor
cmake(Role role);
/// Destructor
@@ -430,7 +433,7 @@ public:
cmListFileBacktrace const& backtrace = cmListFileBacktrace()) const;
///! run the --build option
- int Build(const std::string& dir, const std::string& target,
+ int Build(int jobs, const std::string& dir, const std::string& target,
const std::string& config,
const std::vector<std::string>& nativeOptions, bool clean);