diff options
author | Brad King <brad.king@kitware.com> | 2015-10-12 14:26:15 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-10-12 14:26:15 (GMT) |
commit | 762108f3ec60ca717cdba369dffc84459a7e3282 (patch) | |
tree | c5c294b462c953d9087bb9dc85ad89a2889af19f /Source/cmLocalGenerator.cxx | |
parent | f3fa7c6bc364a523ba7a437402603fd84c6c9e4b (diff) | |
parent | 223d0efe55ff66f6ceb25ecdfbd1d915c76af548 (diff) | |
download | CMake-762108f3ec60ca717cdba369dffc84459a7e3282.zip CMake-762108f3ec60ca717cdba369dffc84459a7e3282.tar.gz CMake-762108f3ec60ca717cdba369dffc84459a7e3282.tar.bz2 |
Merge topic 'add-cmLocalGenerator-API'
223d0efe Remove some needless GetMakefile() calls.
a367416c cmLocalGenerator: Add current source directory accessor.
bbef3c2d cmLocalGenerator: Add current binary directory accessor.
12cb3bdc cmLocalGenerator: Add Home directory accessors.
72efa15d Eclipse: Port API to cmLocalGenerator.
f2a641d6 Kate: Remove unused variables.
10cf42f5 Kate: Port API to cmLocalGenerator.
e46ef270 export: Port internal method to cmGeneratorTarget.
53d3a1c9 cmMakefile: Remove unused GetProjectName calls.
4ab2750c cmLocalGenerator: Add GetProjectName method.
c8187f41 cmCPluginAPI: Inline code to get project name.
8c6e6dd3 cmMakefile: Inline initialization of project name.
27916f2c cmLocalGenerator: Add cmake instance accessor.
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b26151c..c0c50c4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2431,6 +2431,11 @@ const char* cmLocalGenerator::GetFeature(const std::string& feature, return 0; } +std::string cmLocalGenerator::GetProjectName() const +{ + return this->StateSnapshot.GetProjectName(); +} + //---------------------------------------------------------------------------- std::string cmLocalGenerator::ConstructComment(cmCustomCommandGenerator const& ccg, @@ -2858,6 +2863,31 @@ cmLocalGenerator return source.GetLanguage(); } +cmake* cmLocalGenerator::GetCMakeInstance() const +{ + return this->GlobalGenerator->GetCMakeInstance(); +} + +const char* cmLocalGenerator::GetSourceDirectory() const +{ + return this->GetCMakeInstance()->GetHomeDirectory(); +} + +const char* cmLocalGenerator::GetBinaryDirectory() const +{ + return this->GetCMakeInstance()->GetHomeOutputDirectory(); +} + +const char* cmLocalGenerator::GetCurrentBinaryDirectory() const +{ + return this->StateSnapshot.GetDirectory().GetCurrentBinary(); +} + +const char* cmLocalGenerator::GetCurrentSourceDirectory() const +{ + return this->StateSnapshot.GetDirectory().GetCurrentSource(); +} + //---------------------------------------------------------------------------- std::string cmLocalGenerator::GetTargetDirectory(cmTarget const&) const |