diff options
author | Stephen Kelly <steveire@gmail.com> | 2013-11-19 10:50:23 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2013-11-19 19:40:32 (GMT) |
commit | 15eeacefc5aa91a9767a360dbea4fd8a44b8eca6 (patch) | |
tree | b69ed3bfadf610710483f3582b343552c47599bb /Source/cmTarget.h | |
parent | be9dfb6b2ecd5a94d17f1bf7a478bfb85710f2be (diff) | |
download | CMake-15eeacefc5aa91a9767a360dbea4fd8a44b8eca6.zip CMake-15eeacefc5aa91a9767a360dbea4fd8a44b8eca6.tar.gz CMake-15eeacefc5aa91a9767a360dbea4fd8a44b8eca6.tar.bz2 |
cmTarget: Trivially make more API const.
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index cbd5f58..35ec680 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -219,14 +219,14 @@ public: * Set the path where this target should be installed. This is relative to * INSTALL_PREFIX */ - std::string GetInstallPath() {return this->InstallPath;} + std::string GetInstallPath() const {return this->InstallPath;} void SetInstallPath(const char *name) {this->InstallPath = name;} /** * Set the path where this target (if it has a runtime part) should be * installed. This is relative to INSTALL_PREFIX */ - std::string GetRuntimeInstallPath() {return this->RuntimeInstallPath;} + std::string GetRuntimeInstallPath() const {return this->RuntimeInstallPath;} void SetRuntimeInstallPath(const char *name) { this->RuntimeInstallPath = name; } @@ -253,9 +253,9 @@ public: const char *GetProperty(const char *prop) const; const char *GetProperty(const char *prop, cmProperty::ScopeType scope) const; bool GetPropertyAsBool(const char *prop) const; - void CheckProperty(const char* prop, cmMakefile* context); + void CheckProperty(const char* prop, cmMakefile* context) const; - const char* GetFeature(const char* feature, const char* config); + const char* GetFeature(const char* feature, const char* config) const; bool IsImported() const {return this->IsImportedTarget;} @@ -337,7 +337,7 @@ public: If the configuration name is given then the generator will add its subdirectory for that configuration. Otherwise just the canonical pdb output directory is given. */ - std::string GetPDBDirectory(const char* config = 0); + std::string GetPDBDirectory(const char* config = 0) const; /** Get the location of the target in the build tree for the given configuration. This location is suitable for use as the LOCATION @@ -347,12 +347,13 @@ public: /** Get the target major and minor version numbers interpreted from the VERSION property. Version 0 is returned if the property is not set or cannot be parsed. */ - void GetTargetVersion(int& major, int& minor); + void GetTargetVersion(int& major, int& minor) const; /** Get the target major, minor, and patch version numbers interpreted from the VERSION or SOVERSION property. Version 0 is returned if the property is not set or cannot be parsed. */ - void GetTargetVersion(bool soversion, int& major, int& minor, int& patch); + void + GetTargetVersion(bool soversion, int& major, int& minor, int& patch) const; /** * Make sure the full path to all source files is known. @@ -384,7 +385,7 @@ public: /** Test for special case of a third-party shared library that has no soname at all. */ - bool IsImportedSharedLibWithoutSOName(const char* config); + bool IsImportedSharedLibWithoutSOName(const char* config) const; /** Get the full path to the target according to the settings in its makefile and the configuration type. */ @@ -406,12 +407,12 @@ public: std::string& pdbName, const char* config) const; /** Does this target have a GNU implib to convert to MS format? */ - bool HasImplibGNUtoMS(); + bool HasImplibGNUtoMS() const; /** Convert the given GNU import library name (.dll.a) to a name with a new extension (.lib or ${CMAKE_IMPORT_LIBRARY_SUFFIX}). */ bool GetImplibGNUtoMS(std::string const& gnuName, std::string& out, - const char* newExt = 0); + const char* newExt = 0) const; /** * Compute whether this target must be relinked before installing. @@ -466,10 +467,10 @@ public: bool IsExecutableWithExports() const; /** Return whether this target may be used to link another target. */ - bool IsLinkable(); + bool IsLinkable() const; /** Return whether or not the target is for a DLL platform. */ - bool IsDLLPlatform() { return this->DLLPlatform; } + bool IsDLLPlatform() const { return this->DLLPlatform; } /** Return whether or not the target has a DLL import library. */ bool HasImportLibrary() const; @@ -500,7 +501,7 @@ public: /** Return whether this target uses the default value for its output directory. */ - bool UsesDefaultOutputDir(const char* config, bool implib); + bool UsesDefaultOutputDir(const char* config, bool implib) const; /** @return the mac content directory for this target. */ std::string GetMacContentDirectory(const char* config, @@ -553,7 +554,7 @@ public: const char *config) const; std::string GetDebugGeneratorExpressions(const std::string &value, - cmTarget::LinkLibraryType llt); + cmTarget::LinkLibraryType llt) const; void AddSystemIncludeDirectories(const std::set<cmStdString> &incs); void AddSystemIncludeDirectories(const std::vector<std::string> &incs); |