diff options
-rw-r--r-- | Source/cmAddCustomTargetCommand.cxx | 6 | ||||
-rw-r--r-- | Source/cmCPluginAPI.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio6Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 2 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 4 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 14 | ||||
-rw-r--r-- | Source/cmMakefile.h | 4 |
8 files changed, 20 insertions, 16 deletions
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx index 4141509..1bd6757 100644 --- a/Source/cmAddCustomTargetCommand.cxx +++ b/Source/cmAddCustomTargetCommand.cxx @@ -73,13 +73,13 @@ bool cmAddCustomTargetCommand::InitialPass( tdoing doing = doing_command; // Look for the ALL option. - bool all = false; + bool excludeFromAll = true; unsigned int start = 1; if(args.size() > 1) { if(args[1] == "ALL") { - all = true; + excludeFromAll = false; start = 2; } } @@ -160,7 +160,7 @@ bool cmAddCustomTargetCommand::InitialPass( // Add the utility target to the makefile. bool escapeOldStyle = !verbatim; - this->Makefile->AddUtilityCommand(args[0].c_str(), all, + this->Makefile->AddUtilityCommand(args[0].c_str(), excludeFromAll, working_directory.c_str(), depends, commandLines, escapeOldStyle, comment); diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx index 26e8275..fc442a1 100644 --- a/Source/cmCPluginAPI.cxx +++ b/Source/cmCPluginAPI.cxx @@ -236,7 +236,7 @@ void CCONV cmAddUtilityCommand(void *arg, const char* utilityName, } // Pass the call to the makefile instance. - mf->AddUtilityCommand(utilityName, (all ? true : false), + mf->AddUtilityCommand(utilityName, (all ? false : true), 0, depends2, commandLines); } void CCONV cmAddCustomCommand(void *arg, const char* source, diff --git a/Source/cmGlobalVisualStudio6Generator.cxx b/Source/cmGlobalVisualStudio6Generator.cxx index e520a17..10260d7 100644 --- a/Source/cmGlobalVisualStudio6Generator.cxx +++ b/Source/cmGlobalVisualStudio6Generator.cxx @@ -171,7 +171,7 @@ void cmGlobalVisualStudio6Generator::Generate() // add the ALL_BUILD to the first local generator of each project if(gen.size()) { - gen[0]->GetMakefile()->AddUtilityCommand("ALL_BUILD", false, + gen[0]->GetMakefile()->AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_dir, "echo", "Build all projects"); diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 8caf90b..278ebb2 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -226,7 +226,7 @@ void cmGlobalVisualStudio7Generator::Generate() if(gen.size()) { gen[0]->GetMakefile()-> - AddUtilityCommand("ALL_BUILD", false, no_depends, + AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_dir, "echo", "Build all projects"); std::string cmake_command = diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index c512e07..5029240 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -91,7 +91,7 @@ void cmGlobalVisualStudio8Generator::Generate() cmMakefile* mf = lg->GetMakefile(); std::string cmake_command = mf->GetRequiredDefinition("CMAKE_COMMAND"); cmCustomCommandLines noCommandLines; - mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, true, + mf->AddUtilityCommand(CMAKE_CHECK_BUILD_SYSTEM_TARGET, false, no_working_directory, no_depends, noCommandLines); cmTarget* tgt = mf->FindTarget(CMAKE_CHECK_BUILD_SYSTEM_TARGET); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 0f8494f..53c39dd 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -252,7 +252,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, // Add ALL_BUILD const char* no_working_directory = 0; std::vector<std::string> no_depends; - mf->AddUtilityCommand("ALL_BUILD", false, no_depends, + mf->AddUtilityCommand("ALL_BUILD", true, no_depends, no_working_directory, "echo", "Build all projects"); cmTarget* allbuild = mf->FindTarget("ALL_BUILD"); @@ -275,7 +275,7 @@ cmGlobalXCodeGenerator::AddExtraTargets(cmLocalGenerator* root, } cmCustomCommandLines commandLines; commandLines.push_back(makecommand); - mf->AddUtilityCommand("XCODE_DEPEND_HELPER", false, + mf->AddUtilityCommand("XCODE_DEPEND_HELPER", true, no_working_directory, no_depends, commandLines); diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 83b9d14..1679568 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -771,7 +771,8 @@ cmMakefile::AddCustomCommandOldStyle(const char* target, } //---------------------------------------------------------------------------- -void cmMakefile::AddUtilityCommand(const char* utilityName, bool all, +void cmMakefile::AddUtilityCommand(const char* utilityName, + bool excludeFromAll, const std::vector<std::string>& depends, const char* workingDirectory, const char* command, @@ -803,12 +804,13 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all, commandLines.push_back(commandLine); // Call the real signature of this method. - this->AddUtilityCommand(utilityName, all, workingDirectory, + this->AddUtilityCommand(utilityName, excludeFromAll, workingDirectory, depends, commandLines); } //---------------------------------------------------------------------------- -void cmMakefile::AddUtilityCommand(const char* utilityName, bool all, +void cmMakefile::AddUtilityCommand(const char* utilityName, + bool excludeFromAll, const char* workingDirectory, const std::vector<std::string>& depends, const cmCustomCommandLines& commandLines, @@ -818,8 +820,10 @@ void cmMakefile::AddUtilityCommand(const char* utilityName, bool all, cmTarget target; target.SetMakefile(this); target.SetType(cmTarget::UTILITY, utilityName); - target.SetProperty("EXCLUDE_FROM_ALL", (all) ?"FALSE" : "TRUE"); - + if (excludeFromAll) + { + target.SetProperty("EXCLUDE_FROM_ALL", "TRUE"); + } if(!comment) { // Use an empty comment to avoid generation of default comment. diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 606ddee..5d18ead 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -176,7 +176,7 @@ public: * Add a utility to the build. A utiltity target is a command that * is run every time the target is built. */ - void AddUtilityCommand(const char* utilityName, bool all, + void AddUtilityCommand(const char* utilityName, bool excludeFromAll, const std::vector<std::string>& depends, const char* workingDirectory, const char* command, @@ -184,7 +184,7 @@ public: const char* arg2=0, const char* arg3=0, const char* arg4=0); - void AddUtilityCommand(const char* utilityName, bool all, + void AddUtilityCommand(const char* utilityName, bool excludeFromAll, const char* workingDirectory, const std::vector<std::string>& depends, const cmCustomCommandLines& commandLines, |