summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-11-19 10:05:47 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-11-19 19:40:31 (GMT)
commit50d152035da514005eaaa1d3e39e407676efd73c (patch)
treef05b8412ffb6f673918b9d21f3fe3d591f16af68 /Source/cmTarget.h
parent0f876439e941c18f7fc264fbf02f5df9bc531f90 (diff)
downloadCMake-50d152035da514005eaaa1d3e39e407676efd73c.zip
CMake-50d152035da514005eaaa1d3e39e407676efd73c.tar.gz
CMake-50d152035da514005eaaa1d3e39e407676efd73c.tar.bz2
cmTarget: Make custom command accessors API const.
Add specific mutators instead of providing non-const refs.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index b516a0a..bafcb15 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -114,12 +114,18 @@ public:
/**
* Get the list of the custom commands for this target
*/
- std::vector<cmCustomCommand> &GetPreBuildCommands()
+ std::vector<cmCustomCommand> const &GetPreBuildCommands() const
{return this->PreBuildCommands;}
- std::vector<cmCustomCommand> &GetPreLinkCommands()
+ std::vector<cmCustomCommand> const &GetPreLinkCommands() const
{return this->PreLinkCommands;}
- std::vector<cmCustomCommand> &GetPostBuildCommands()
+ std::vector<cmCustomCommand> const &GetPostBuildCommands() const
{return this->PostBuildCommands;}
+ void AddPreBuildCommand(cmCustomCommand const &cmd)
+ {this->PreBuildCommands.push_back(cmd);}
+ void AddPreLinkCommand(cmCustomCommand const &cmd)
+ {this->PreLinkCommands.push_back(cmd);}
+ void AddPostBuildCommand(cmCustomCommand const &cmd)
+ {this->PostBuildCommands.push_back(cmd);}
/**
* Get the list of the source files used by this target