diff options
-rw-r--r-- | Source/cmCustomCommand.cxx | 3 | ||||
-rw-r--r-- | Source/cmCustomCommand.h | 5 | ||||
-rw-r--r-- | Source/cmLocalUnixMakefileGenerator3.cxx | 24 |
3 files changed, 1 insertions, 31 deletions
diff --git a/Source/cmCustomCommand.cxx b/Source/cmCustomCommand.cxx index 8d794f7..d677798 100644 --- a/Source/cmCustomCommand.cxx +++ b/Source/cmCustomCommand.cxx @@ -19,7 +19,6 @@ //---------------------------------------------------------------------------- cmCustomCommand::cmCustomCommand() { - m_Used = false; } //---------------------------------------------------------------------------- @@ -29,7 +28,6 @@ cmCustomCommand::cmCustomCommand(const cmCustomCommand& r): m_CommandLines(r.m_CommandLines), m_Comment(r.m_Comment) { - m_Used = false; } //---------------------------------------------------------------------------- @@ -42,7 +40,6 @@ cmCustomCommand::cmCustomCommand(const char* output, m_CommandLines(commandLines), m_Comment(comment?comment:"") { - m_Used = false; } //---------------------------------------------------------------------------- diff --git a/Source/cmCustomCommand.h b/Source/cmCustomCommand.h index e6d696a..0a87949 100644 --- a/Source/cmCustomCommand.h +++ b/Source/cmCustomCommand.h @@ -49,16 +49,11 @@ public: /** Get the comment string for the command. */ const char* GetComment() const; - /** set get the used status of the command */ - void Used() { m_Used = true;}; - bool IsUsed() { return m_Used;}; - private: std::string m_Output; std::vector<std::string> m_Depends; cmCustomCommandLines m_CommandLines; std::string m_Comment; - bool m_Used; }; #endif diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx index fde40bc..1ccb61c 100644 --- a/Source/cmLocalUnixMakefileGenerator3.cxx +++ b/Source/cmLocalUnixMakefileGenerator3.cxx @@ -92,22 +92,6 @@ void cmLocalUnixMakefileGenerator3::Generate() // Write the cmake file with information for this directory. this->WriteDirectoryInformationFile(); - - // all custom commands used? - const std::vector<cmSourceFile*> &srcs = m_Makefile->GetSourceFiles(); - std::vector<cmSourceFile*>::const_iterator sit = srcs.begin(); - for (;sit != srcs.end(); ++sit) - { - if ((*sit)->GetCustomCommand() && !(*sit)->GetCustomCommand()->IsUsed()) - { - cmOStringStream err; - err << "Warning: Custom command for source file " - << (*sit)->GetSourceName().c_str() << "." - << (*sit)->GetSourceExtension().c_str() - << " was not used."; - cmSystemTools::Message(err.str().c_str(), "Warning"); - } - } } @@ -163,23 +147,17 @@ void cmLocalUnixMakefileGenerator3 ::WriteCustomCommands(cmTarget &target,std::ostream& ruleFileStream, std::vector<std::string>& cleanFiles) { - std::string tgtDir = m_Makefile->GetStartOutputDirectory(); - tgtDir += "/"; - tgtDir += this->GetTargetDirectory(target); - // add custom commands to the clean rules? const char* clean_no_custom = m_Makefile->GetProperty("CLEAN_NO_CUSTOM"); bool clean = cmSystemTools::IsOff(clean_no_custom); // Generate the rule files for each custom command. - // get the classes from the source lists then add them to the groups - const std::vector<cmSourceFile*> &classes = target.GetSourceFiles(); + const std::vector<cmSourceFile*> &classes = m_Makefile->GetSourceFiles(); for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); i != classes.end(); i++) { if(cmCustomCommand* cc = (*i)->GetCustomCommand()) { - cc->Used(); this->GenerateCustomRuleFile(*cc,ruleFileStream); if (clean) { |