diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 5c7d4002f..eccc2c13f 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\n"; fout << "\n"; @@ -761,18 +749,6 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const excludeFromOut += "**/CMakeFiles/"; fout << "\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::const_iterator - it = this->OutLinkedResources.begin(); - it != this->OutLinkedResources.end(); - ++it) - { - fout << "EscapeForXML(*it) - << "\"/>\n"; - } // add pre-processor definitions to allow eclipse to gray out sections emmited.clear(); @@ -1317,65 +1293,3 @@ void cmExtraEclipseCDT4Generator "\t\t\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 ebd8c081e..37ce65e75 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& includeDirs, std::set& emittedDirs); @@ -109,7 +105,6 @@ private: void CreateLinksForTargets(cmGeneratedFileStream& fout); std::vector SrcLinkedResources; - std::vector OutLinkedResources; std::string HomeDirectory; std::string HomeOutputDirectory; bool IsOutOfSourceBuild;