summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorDaniel Eiband <daniel.eiband@brainlab.com>2019-09-20 20:44:14 (GMT)
committerBrad King <brad.king@kitware.com>2019-09-26 14:02:06 (GMT)
commitf151a5770597dbe341fc6329a711f40e9195c773 (patch)
treeca2f50db700d240033ffcf7dbbb8e73d596ddeca /Source/cmMakefile.cxx
parent28a2613dd291c641f17940e3f996bd4cc9b9888d (diff)
downloadCMake-f151a5770597dbe341fc6329a711f40e9195c773.zip
CMake-f151a5770597dbe341fc6329a711f40e9195c773.tar.gz
CMake-f151a5770597dbe341fc6329a711f40e9195c773.tar.bz2
cmMakefile: Move enumerations into new header
The enumerations will also be used in cmLocalGenerator.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx27
1 files changed, 14 insertions, 13 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 34081ed..e53851d 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -39,6 +39,7 @@
#include "cmStateDirectory.h"
#include "cmStateTypes.h"
#include "cmSystemTools.h"
+#include "cmTarget.h"
#include "cmTargetLinkLibraryType.h"
#include "cmTest.h"
#include "cmTestGenerator.h" // IWYU pragma: keep
@@ -840,10 +841,10 @@ bool cmMakefile::ValidateCustomCommand(
cmTarget* cmMakefile::AddCustomCommandToTarget(
const std::string& target, const std::vector<std::string>& byproducts,
const std::vector<std::string>& depends,
- const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type,
+ const cmCustomCommandLines& commandLines, cmCustomCommandType type,
const char* comment, const char* workingDir, bool escapeOldStyle,
bool uses_terminal, const std::string& depfile, const std::string& job_pool,
- bool command_expand_lists, ObjectLibraryCommands objLibraryCommands)
+ bool command_expand_lists, cmObjectLibraryCommands objLibCommands)
{
// Find the target to which to add the custom command.
auto ti = this->Targets.find(target);
@@ -884,7 +885,7 @@ cmTarget* cmMakefile::AddCustomCommandToTarget(
}
cmTarget* t = &ti->second;
- if (objLibraryCommands == RejectObjectLibraryCommands &&
+ if (objLibCommands == cmObjectLibraryCommands::Reject &&
t->GetType() == cmStateEnums::OBJECT_LIBRARY) {
std::ostringstream e;
e << "Target \"" << target
@@ -920,7 +921,7 @@ cmTarget* cmMakefile::AddCustomCommandToTarget(
void cmMakefile::CommitCustomCommandToTarget(
cmTarget* target, const std::vector<std::string>& byproducts,
const std::vector<std::string>& depends,
- const cmCustomCommandLines& commandLines, cmTarget::CustomCommandType type,
+ const cmCustomCommandLines& commandLines, cmCustomCommandType type,
const char* comment, const char* workingDir, bool escapeOldStyle,
bool uses_terminal, const std::string& depfile, const std::string& job_pool,
bool command_expand_lists)
@@ -936,13 +937,13 @@ void cmMakefile::CommitCustomCommandToTarget(
cc.SetDepfile(depfile);
cc.SetJobPool(job_pool);
switch (type) {
- case cmTarget::PRE_BUILD:
+ case cmCustomCommandType::PRE_BUILD:
target->AddPreBuildCommand(cc);
break;
- case cmTarget::PRE_LINK:
+ case cmCustomCommandType::PRE_LINK:
target->AddPreLinkCommand(cc);
break;
- case cmTarget::POST_BUILD:
+ case cmCustomCommandType::POST_BUILD:
target->AddPostBuildCommand(cc);
break;
}
@@ -1157,9 +1158,9 @@ void cmMakefile::AddCustomCommandOldStyle(
// same then it added a post-build rule to the target. Preserve
// this behavior.
std::vector<std::string> no_byproducts;
- this->AddCustomCommandToTarget(target, no_byproducts, depends,
- commandLines, cmTarget::POST_BUILD, comment,
- nullptr);
+ this->AddCustomCommandToTarget(
+ target, no_byproducts, depends, commandLines,
+ cmCustomCommandType::POST_BUILD, comment, nullptr);
return;
}
@@ -1248,7 +1249,7 @@ void cmMakefile::CommitAppendCustomCommandToOutput(
}
cmTarget* cmMakefile::AddUtilityCommand(
- const std::string& utilityName, TargetOrigin origin, bool excludeFromAll,
+ const std::string& utilityName, cmCommandOrigin origin, bool excludeFromAll,
const char* workingDirectory, const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines, bool escapeOldStyle,
const char* comment, bool uses_terminal, bool command_expand_lists,
@@ -1262,7 +1263,7 @@ cmTarget* cmMakefile::AddUtilityCommand(
}
cmTarget* cmMakefile::AddUtilityCommand(
- const std::string& utilityName, TargetOrigin origin, bool excludeFromAll,
+ const std::string& utilityName, cmCommandOrigin origin, bool excludeFromAll,
const char* workingDirectory, const std::vector<std::string>& byproducts,
const std::vector<std::string>& depends,
const cmCustomCommandLines& commandLines, bool escapeOldStyle,
@@ -1271,7 +1272,7 @@ cmTarget* cmMakefile::AddUtilityCommand(
{
// Create a target instance for this utility.
cmTarget* target = this->AddNewTarget(cmStateEnums::UTILITY, utilityName);
- target->SetIsGeneratorProvided(origin == TargetOrigin::Generator);
+ target->SetIsGeneratorProvided(origin == cmCommandOrigin::Generator);
if (excludeFromAll || this->GetPropertyAsBool("EXCLUDE_FROM_ALL")) {
target->SetProperty("EXCLUDE_FROM_ALL", "TRUE");
}