[Cmake-commits] CMake branch, next, updated. v2.8.9-123-g1b33e8a
Alexander Neundorf
neundorf at kde.org
Thu Aug 16 17:16:17 EDT 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 1b33e8a0f802c011c6789fce2384480d706b2811 (commit)
via 5271ba56be87d5f412ea21c6c30cb72a893ceb25 (commit)
from 79d2c9c0e3f946bb290a7da447e9e5272d0b31bf (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1b33e8a0f802c011c6789fce2384480d706b2811
commit 1b33e8a0f802c011c6789fce2384480d706b2811
Merge: 79d2c9c 5271ba5
Author: Alexander Neundorf <neundorf at kde.org>
AuthorDate: Thu Aug 16 17:16:13 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 16 17:16:13 2012 -0400
Merge topic 'EclipseRemoveLinkedOutputDirectoryResources' into next
5271ba5 Eclipse: fix #13358: don't create bad linked resources
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5271ba56be87d5f412ea21c6c30cb72a893ceb25
commit 5271ba56be87d5f412ea21c6c30cb72a893ceb25
Author: Alex Neundorf <neundorf at kde.org>
AuthorDate: Sat Jul 28 18:00:19 2012 +0200
Commit: Alex Neundorf <neundorf at kde.org>
CommitDate: Thu Aug 16 23:15:21 2012 +0200
Eclipse: fix #13358: don't create bad linked resources
directory where the project file is located (${CMAKE_BINARY_DIR}), which can
happen e.g. for EXECUTABLE_OUTPUT_PATH and related variables.
Now, it seems this code never worked.
If EXECUTABLE_OUTPUT_PATH was set to point into a subdir of CMAKE_BINARY_DIR,
the code did nothing.
If it pointed directly at CMAKE_BINARY_DIR or some other location, it created
a linked resource. I tested this with Eclipse Europa (3.3) and Juno (4.2), and in this
case both versions of Eclipse complained that this is a bad location for a linked resource.
Alex
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 5c7d400..eccc2c1 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -462,18 +462,6 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile()
this->CreateLinksForTargets(fout);
}
- // I'm not sure this makes too much sense. There can be different
- // output directories in different subdirs, so we would need more of them.
-
- // for EXECUTABLE_OUTPUT_PATH when not in binary dir
- this->AppendOutLinkedResource(fout,
- mf->GetSafeDefinition("CMAKE_RUNTIME_OUTPUT_DIRECTORY"),
- mf->GetSafeDefinition("EXECUTABLE_OUTPUT_PATH"));
- // for LIBRARY_OUTPUT_PATH when not in binary dir
- this->AppendOutLinkedResource(fout,
- mf->GetSafeDefinition("CMAKE_LIBRARY_OUTPUT_DIRECTORY"),
- mf->GetSafeDefinition("LIBRARY_OUTPUT_PATH"));
-
fout << "\t</linkedResources>\n";
fout << "</projectDescription>\n";
@@ -761,18 +749,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
excludeFromOut += "**/CMakeFiles/";
fout << "<pathentry excluding=\"" << excludeFromOut
<< "\" kind=\"out\" path=\"\"/>\n";
- // add output entry for EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH
- // - if it is a subdir of homeOutputDirectory, there is no need to add it
- // - if it is not then create a linked resource and add the linked name
- // but check it doesn't conflict with other linked resources names
- for (std::vector<std::string>::const_iterator
- it = this->OutLinkedResources.begin();
- it != this->OutLinkedResources.end();
- ++it)
- {
- fout << "<pathentry kind=\"out\" path=\"" << this->EscapeForXML(*it)
- << "\"/>\n";
- }
// add pre-processor definitions to allow eclipse to gray out sections
emmited.clear();
@@ -1317,65 +1293,3 @@ void cmExtraEclipseCDT4Generator
"\t\t</link>\n"
;
}
-
-bool cmExtraEclipseCDT4Generator
-::AppendOutLinkedResource(cmGeneratedFileStream& fout,
- const std::string& defname,
- const std::string& altdefname)
-{
- if (defname.empty() && altdefname.empty())
- {
- return false;
- }
-
- std::string outputPath = (defname.empty() ? altdefname : defname);
-
- if (!cmSystemTools::FileIsFullPath(outputPath.c_str()))
- {
- outputPath = this->HomeOutputDirectory + "/" + outputPath;
- }
-
- // in this case it's not necessary:
- if (cmSystemTools::IsSubDirectory(outputPath.c_str(),
- this->HomeOutputDirectory.c_str()))
- {
- return false;
- }
-
- // in these two cases Eclipse would complain:
- if (cmSystemTools::IsSubDirectory(this->HomeOutputDirectory.c_str(),
- outputPath.c_str()))
- {
- return false;
- }
- if (cmSystemTools::GetRealPath(outputPath.c_str())
- == cmSystemTools::GetRealPath(this->HomeOutputDirectory.c_str()))
- {
- return false;
- }
-
- std::string name = this->GetPathBasename(outputPath);
-
- // make sure linked resource name is unique
- while (this->GlobalGenerator->GetProjectMap().find(name)
- != this->GlobalGenerator->GetProjectMap().end())
- {
- name += "_";
- }
-
- if (std::find(this->OutLinkedResources.begin(),
- this->OutLinkedResources.end(),
- name)
- != this->OutLinkedResources.end())
- {
- return false;
- }
- else
- {
- this->AppendLinkedResource(fout, name,
- this->GetEclipsePath(outputPath), LinkToFolder);
- this->OutLinkedResources.push_back(name);
- return true;
- }
-}
-
diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h
index ebd8c08..37ce65e 100644
--- a/Source/cmExtraEclipseCDT4Generator.h
+++ b/Source/cmExtraEclipseCDT4Generator.h
@@ -93,10 +93,6 @@ private:
const std::string& path,
LinkType linkType);
- bool AppendOutLinkedResource(cmGeneratedFileStream& fout,
- const std::string& defname,
- const std::string& altdefname);
-
static void AppendIncludeDirectories(cmGeneratedFileStream& fout,
const std::vector<std::string>& includeDirs,
std::set<std::string>& emittedDirs);
@@ -109,7 +105,6 @@ private:
void CreateLinksForTargets(cmGeneratedFileStream& fout);
std::vector<std::string> SrcLinkedResources;
- std::vector<std::string> OutLinkedResources;
std::string HomeDirectory;
std::string HomeOutputDirectory;
bool IsOutOfSourceBuild;
-----------------------------------------------------------------------
Summary of changes:
Source/cmExtraEclipseCDT4Generator.cxx | 86 --------------------------------
Source/cmExtraEclipseCDT4Generator.h | 5 --
2 files changed, 0 insertions(+), 91 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list