summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraCodeLiteGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-12 14:26:15 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-10-12 14:26:15 (GMT)
commit762108f3ec60ca717cdba369dffc84459a7e3282 (patch)
treec5c294b462c953d9087bb9dc85ad89a2889af19f /Source/cmExtraCodeLiteGenerator.cxx
parentf3fa7c6bc364a523ba7a437402603fd84c6c9e4b (diff)
parent223d0efe55ff66f6ceb25ecdfbd1d915c76af548 (diff)
downloadCMake-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/cmExtraCodeLiteGenerator.cxx')
-rw-r--r--Source/cmExtraCodeLiteGenerator.cxx24
1 files changed, 11 insertions, 13 deletions
diff --git a/Source/cmExtraCodeLiteGenerator.cxx b/Source/cmExtraCodeLiteGenerator.cxx
index 496c1a8..31dbf3d 100644
--- a/Source/cmExtraCodeLiteGenerator.cxx
+++ b/Source/cmExtraCodeLiteGenerator.cxx
@@ -68,15 +68,15 @@ void cmExtraCodeLiteGenerator::Generate()
const cmMakefile* mf =it->second[0]->GetMakefile();
this->ConfigName = GetConfigurationName( mf );
- if (strcmp(mf->GetCurrentBinaryDirectory(),
- mf->GetHomeOutputDirectory()) == 0)
+ if (strcmp(it->second[0]->GetCurrentBinaryDirectory(),
+ it->second[0]->GetBinaryDirectory()) == 0)
{
- workspaceOutputDir = mf->GetCurrentBinaryDirectory();
- workspaceProjectName = mf->GetProjectName();
- workspaceSourcePath = mf->GetHomeDirectory();
+ workspaceOutputDir = it->second[0]->GetCurrentBinaryDirectory();
+ workspaceProjectName = it->second[0]->GetProjectName();
+ workspaceSourcePath = it->second[0]->GetSourceDirectory();
workspaceFileName = workspaceOutputDir+"/";
workspaceFileName += workspaceProjectName + ".workspace";
- this->WorkspacePath = mf->GetCurrentBinaryDirectory();;
+ this->WorkspacePath = it->second[0]->GetCurrentBinaryDirectory();;
fout.Open(workspaceFileName.c_str(), false, false);
fout << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
@@ -91,9 +91,8 @@ void cmExtraCodeLiteGenerator::Generate()
++it)
{
// retrive project information
- const cmMakefile* mf = it->second[0]->GetMakefile();
- std::string outputDir = mf->GetCurrentBinaryDirectory();
- std::string projectName = mf->GetProjectName();
+ std::string outputDir = it->second[0]->GetCurrentBinaryDirectory();
+ std::string projectName = it->second[0]->GetProjectName();
std::string filename = outputDir + "/" + projectName + ".project";
// Make the project file relative to the workspace
@@ -121,9 +120,8 @@ void cmExtraCodeLiteGenerator::Generate()
void cmExtraCodeLiteGenerator::CreateProjectFile(
const std::vector<cmLocalGenerator*>& lgs)
{
- const cmMakefile* mf = lgs[0]->GetMakefile();
- std::string outputDir = mf->GetCurrentBinaryDirectory();
- std::string projectName = mf->GetProjectName();
+ std::string outputDir = lgs[0]->GetCurrentBinaryDirectory();
+ std::string projectName = lgs[0]->GetProjectName();
std::string filename = outputDir + "/";
filename += projectName + ".project";
@@ -143,7 +141,7 @@ void cmExtraCodeLiteGenerator
////////////////////////////////////
fout << "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
- "<CodeLite_Project Name=\"" << mf->GetProjectName()
+ "<CodeLite_Project Name=\"" << lgs[0]->GetProjectName()
<< "\" InternalType=\"\">\n";
// Collect all used source files in the project