diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-01 20:55:32 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-05-01 20:55:32 (GMT) |
commit | 96ec40943cc1f96d8789fff62c6416a91c01f066 (patch) | |
tree | 1a5dc61afab89b36a15d9fd886c771104e029783 /Source/cmMakefile.cxx | |
parent | 13d4fd06f09ad1beaab01d714c246dbee2568373 (diff) | |
download | CMake-96ec40943cc1f96d8789fff62c6416a91c01f066.zip CMake-96ec40943cc1f96d8789fff62c6416a91c01f066.tar.gz CMake-96ec40943cc1f96d8789fff62c6416a91c01f066.tar.bz2 |
ENH: implement ADD_TARGET command, and add an ALL_BUILD target
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index d706d46..e063ee6 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -486,7 +486,7 @@ void cmMakefile::SetProjectName(const char* p) void cmMakefile::AddLibrary(const char* lname, const std::vector<std::string> &srcs) { cmTarget target; - target.SetIsALibrary(1); + target.SetType(cmTarget::LIBRARY); target.GetSourceLists() = srcs; m_Targets.insert(cmTargets::value_type(lname,target)); } @@ -495,12 +495,24 @@ void cmMakefile::AddExecutable(const char *exeName, const std::vector<std::string> &srcs) { cmTarget target; - target.SetIsALibrary(0); + target.SetType(cmTarget::EXECUTABLE); target.GetSourceLists() = srcs; m_Targets.insert(cmTargets::value_type(exeName,target)); } +void cmMakefile::AddUtilityCommand(const char* utilityName, + const char* command) +{ + cmTarget target; + target.SetType(cmTarget::UTILITY); + std::vector<std::string> empty; + cmCustomCommand cc(utilityName, command, empty, empty); + target.GetCustomCommands().push_back(cc); + m_Targets.insert(cmTargets::value_type(utilityName,target)); +} + + void cmMakefile::AddSourceGroup(const char* name, const char* regex) { // First see if the group exists. If so, replace its regular expression. |