summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h37
1 files changed, 12 insertions, 25 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ac01326..17eb340 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -13,6 +13,7 @@
#include <utility>
#include <vector>
+#include "cmAlgorithms.h"
#include "cmCustomCommandLines.h"
#include "cmDuration.h"
#include "cmExportSetMap.h"
@@ -56,33 +57,20 @@ struct GeneratedMakeCommand
{
// Add each argument as a separate element to the vector
template <typename... T>
- void add(T&&... args)
+ void Add(T&&... args)
{
// iterate the args and append each one
AppendStrs(PrimaryCommand, std::forward<T>(args)...);
}
// Add each value in the iterators as a separate element to the vector
- void add(std::vector<std::string>::const_iterator start,
+ void Add(std::vector<std::string>::const_iterator start,
std::vector<std::string>::const_iterator end)
{
PrimaryCommand.insert(PrimaryCommand.end(), start, end);
}
- std::string printable() const
- {
- std::size_t size = PrimaryCommand.size();
- for (auto&& i : PrimaryCommand) {
- size += i.size();
- }
- std::string buffer;
- buffer.reserve(size);
- for (auto&& i : PrimaryCommand) {
- buffer.append(i);
- buffer.append(1, ' ');
- }
- return buffer;
- }
+ std::string Printable() const { return cmJoin(PrimaryCommand, " "); }
std::vector<std::string> PrimaryCommand;
bool RequiresOutputForward = false;
@@ -216,10 +204,10 @@ public:
*/
int Build(
int jobs, const std::string& srcdir, const std::string& bindir,
- const std::string& projectName, const std::string& targetName,
- std::string& output, const std::string& makeProgram,
- const std::string& config, bool clean, bool fast, bool verbose,
- cmDuration timeout,
+ const std::string& projectName,
+ std::vector<std::string> const& targetNames, std::string& output,
+ const std::string& makeProgram, const std::string& config, bool clean,
+ bool fast, bool verbose, cmDuration timeout,
cmSystemTools::OutputOption outputflag = cmSystemTools::OUTPUT_NONE,
std::vector<std::string> const& nativeOptions =
std::vector<std::string>());
@@ -234,11 +222,10 @@ public:
{
};
- virtual void GenerateBuildCommand(
- GeneratedMakeCommand& makeCommand, const std::string& makeProgram,
- const std::string& projectName, const std::string& projectDir,
- const std::string& targetName, const std::string& config, bool fast,
- int jobs, bool verbose,
+ virtual std::vector<GeneratedMakeCommand> GenerateBuildCommand(
+ const std::string& makeProgram, const std::string& projectName,
+ const std::string& projectDir, std::vector<std::string> const& targetNames,
+ const std::string& config, bool fast, int jobs, bool verbose,
std::vector<std::string> const& makeOptions = std::vector<std::string>());
virtual void PrintBuildCommandAdvice(std::ostream& os, int jobs) const;