diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 92d39771c..51f37d068 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -25,15 +25,18 @@ #include "cmTarget.h" #include "cmSystemTools.h" +#include //---------------------------------------------------------------------------- cmExtraEclipseCDT4Generator ::cmExtraEclipseCDT4Generator() : cmExternalMakefileProjectGenerator() { +// TODO: Verify if __CYGWIN__ should be checked. +//#if defined(_WIN32) && !defined(__CYGWIN__) #if defined(_WIN32) this->SupportedGlobalGenerators.push_back("NMake Makefiles"); + this->SupportedGlobalGenerators.push_back("MinGW Makefiles"); // this->SupportedGlobalGenerators.push_back("MSYS Makefiles"); -// this->SupportedGlobalGenerators.push_back("MinGW Makefiles"); #endif this->SupportedGlobalGenerators.push_back("Unix Makefiles"); } @@ -81,8 +84,9 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const const cmMakefile* mf = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); - std::string filename = mf->GetStartOutputDirectory(); - filename = filename + "/" + ".project"; + const std::string homeDirectory(mf->GetHomeDirectory()); + const std::string homeOutputDirectory(mf->GetHomeOutputDirectory()); + const std::string filename = homeOutputDirectory + "/.project"; cmGeneratedFileStream fout(filename.c_str()); if (!fout) @@ -93,7 +97,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const fout << "\n" "\n" - "\t" << mf->GetProjectName() << "\n" + "\t" << this->GetPathBasename(homeOutputDirectory) << "\n" "\t\n" "\t\n" "\t\n" @@ -104,7 +108,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const "\t\t\t\n" ; - // use clean target... + // use clean target fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.cleanBuildTarget\n" @@ -124,13 +128,8 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const "\t\t\t\t\n" ; - // set the make command... + // set the make command std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); - //fout << "\t\t\t\t\n" - // "\t\t\t\t\torg.eclipse.cdt.make.core.buildCommand\n" - // "\t\t\t\t\t" + make + "\n" - // "\t\t\t\t\n" - // ; fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.enabledIncrementalBuild\n" @@ -138,7 +137,7 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const "\t\t\t\t\n" "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.build.command\n" - "\t\t\t\t\t" + make + "\n" + "\t\t\t\t\t" + this->GetEclipsePath(make) + "\n" "\t\t\t\t\n" "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.contents\n" @@ -155,16 +154,47 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.buildLocation\n" "\t\t\t\t\t" - << this->GetEclipsePath(mf->GetStartOutputDirectory()) << "\n" + << this->GetEclipsePath(homeOutputDirectory) << "\n" "\t\t\t\t\n" "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.useDefaultBuildCmd\n" "\t\t\t\t\tfalse\n" "\t\t\t\t\n" + ; + + // set project specific environment + fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.environment\n" - "\t\t\t\t\t\n" + "\t\t\t\t\t" + ; + // set vsvars32.bat environment available at CMake time, + // but not necessarily when eclipse is open + if (make.find("nmake") != std::string::npos) + { + if (getenv("PATH")) + { + fout << "PATH=" << getenv("PATH") << "|"; + } + if (getenv("INCLUDE")) + { + fout << "INCLUDE=" << getenv("INCLUDE") << "|"; + } + if (getenv("LIB")) + { + fout << "LIB=" << getenv("LIB") << "|"; + } + if (getenv("LIBPATH")) + { + fout << "LIBPATH=" << getenv("LIBPATH") << "|"; + } + } + fout << + "\n" "\t\t\t\t\n" + ; + + fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.enableFullBuild\n" "\t\t\t\t\ttrue\n" @@ -192,22 +222,34 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.build.location\n" "\t\t\t\t\t" - << this->GetEclipsePath(mf->GetStartOutputDirectory()) << "\n" + << this->GetEclipsePath(homeOutputDirectory) << "\n" "\t\t\t\t\n" "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.make.core.autoBuildTarget\n" "\t\t\t\t\tall\n" "\t\t\t\t\n" + ; + + // set error parsers + fout << "\t\t\t\t\n" "\t\t\t\t\torg.eclipse.cdt.core.errorOutputParser\n" "\t\t\t\t\t" + ; + if (this->GetToolChainType(*mf) == EclipseToolchainOther) + { + fout << "org.eclipse.cdt.core.VCErrorParser;"; + } + fout << "org.eclipse.cdt.core.MakeErrorParser;" "org.eclipse.cdt.core.GCCErrorParser;" "org.eclipse.cdt.core.GASErrorParser;" "org.eclipse.cdt.core.GLDErrorParser;" - // *** "org.eclipse.cdt.core.VCErrorParser;" "\n" "\t\t\t\t\n" + ; + + fout << "\t\t\t\n" "\t\t\n" "\t\t\n" @@ -216,36 +258,91 @@ void cmExtraEclipseCDT4Generator::CreateProjectFile() const "\t\t\t\n" "\t\t\n" "\t\n" + ; + + // set natures for c/c++ projects + fout << "\t\n" - // *** ccnature only if it is c++ ??? + // TODO: ccnature only if it is c++ ??? "\t\torg.eclipse.cdt.core.ccnature\n" "\t\torg.eclipse.cdt.make.core.makeNature\n" "\t\torg.eclipse.cdt.make.core.ScannerConfigNature\n" "\t\torg.eclipse.cdt.core.cnature\n" "\t\n" - "\t\n" ; - // for each sub project create a linked resource to the source dir - for (std::map >::const_iterator - it = this->GlobalGenerator->GetProjectMap().begin(); - it != this->GlobalGenerator->GetProjectMap().end(); - ++it) + // TODO: refactor this + // create linked resources + if (homeDirectory != homeOutputDirectory) { - fout << "\t\t\n" - "\t\t\t" << it->first << "\n" - "\t\t\t2\n" - "\t\t\t" - << this->GetEclipsePath( - it->second[0]->GetMakefile()->GetStartDirectory()) - << "\n" - "\t\t\n" - ; + fout << "\t\n"; + // for each sub project create a linked resource to the source dir + // - only if it is an out-of-source build + for (std::map >::const_iterator + it = this->GlobalGenerator->GetProjectMap().begin(); + it != this->GlobalGenerator->GetProjectMap().end(); + ++it) + { + fout << + "\t\t\n" + "\t\t\t" << it->first << "\n" + "\t\t\t2\n" + "\t\t\t" + << this->GetEclipsePath( + it->second[0]->GetMakefile()->GetStartDirectory()) + << "\n" + "\t\t\n" + ; + } + // for EXECUTABLE_OUTPUT_PATH when not in binary dir + std::string output_path = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + if (!cmSystemTools::IsSubDirectory(output_path.c_str(), + homeOutputDirectory.c_str())) + { + std::string name = this->GetPathBasename(output_path); + while (this->GlobalGenerator->GetProjectMap().find(name) + != this->GlobalGenerator->GetProjectMap().end()) + { + name += "_"; + } + fout << + "\t\t\n" + "\t\t\t" << name << "\n" + "\t\t\t2\n" + "\t\t\t" + << this->GetEclipsePath(output_path) + << "\n" + "\t\t\n" + ; + } + // for LIBRARY_OUTPUT_PATH when not in binary dir + if (output_path != mf->GetDefinition("LIBRARY_OUTPUT_PATH")) + { + output_path = mf->GetDefinition("LIBRARY_OUTPUT_PATH"); + if (!cmSystemTools::IsSubDirectory(output_path.c_str(), + homeOutputDirectory.c_str())) + { + std::string name = this->GetPathBasename(output_path); + while (this->GlobalGenerator->GetProjectMap().find(name) + != this->GlobalGenerator->GetProjectMap().end()) + { + name += "_"; + } + fout << + "\t\t\n" + "\t\t\t" << name << "\n" + "\t\t\t2\n" + "\t\t\t" + << this->GetEclipsePath(output_path) + << "\n" + "\t\t\n" + ; + } + } + fout << "\t\n"; } - fout << "\t\n" - "\n" - ; + fout << "\n"; } //---------------------------------------------------------------------------- @@ -256,8 +353,8 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const const cmMakefile* mf = this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile(); - std::string filename = mf->GetStartOutputDirectory(); - filename = filename + "/" + ".cproject"; + const std::string homeOutputDirectory(mf->GetHomeOutputDirectory()); + const std::string filename = homeOutputDirectory + "/.cproject"; cmGeneratedFileStream fout(filename.c_str()); if (!fout) @@ -275,7 +372,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const fout << "\n"; - // *** what is this... + // Configuration settings... fout << "\n" "\n" ; - // *** refactor this out... - switch (GetToolChainType(*mf)) + // TODO: refactor this out... + switch (this->GetToolChainType(*mf)) { case EclipseToolchainLinux : fout << "GlobalGenerator->GetProjectMap().end(); ++it) { - fout << "first << "\"/>\n" - ; - exclude_from_out += it->first + "/,"; + fout << "first << "\"/>\n"; + + // exlude source directory from output search path + // - only if not named the same as an output directory + if (!cmSystemTools::FileIsDirectory( + std::string(homeOutputDirectory + "/" + it->first).c_str())) + { + exclude_from_out += it->first + "/|"; + } } - exclude_from_out.resize(exclude_from_out.size()-1); + exclude_from_out += "**/CMakeFiles/"; fout << "\n" - ; + << "\" 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 + std::string output_path = mf->GetDefinition("EXECUTABLE_OUTPUT_PATH"); + if (!cmSystemTools::IsSubDirectory(output_path.c_str(), + homeOutputDirectory.c_str())) + { + std::string name = this->GetPathBasename(output_path); + while (this->GlobalGenerator->GetProjectMap().find(name) + != this->GlobalGenerator->GetProjectMap().end()) + { + name += "_"; + } + fout << "\n"; + } + // for LIBRARY_OUTPUT_PATH when not in binary dir + if (output_path != mf->GetDefinition("LIBRARY_OUTPUT_PATH")) + { + output_path = mf->GetDefinition("LIBRARY_OUTPUT_PATH"); + if (!cmSystemTools::IsSubDirectory(output_path.c_str(), + homeOutputDirectory.c_str())) + { + std::string name = this->GetPathBasename(output_path); + while (this->GlobalGenerator->GetProjectMap().find(name) + != this->GlobalGenerator->GetProjectMap().end()) + { + name += "_"; + } + fout << "\n"; + } + } + // include dirs emmited.clear(); for (std::vector::const_iterator @@ -385,16 +520,16 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const inc != includeDirs.end(); ++inc) { - if(emmited.find(*inc) == emmited.end()) + std::string dir = cmSystemTools::CollapseFullPath(inc->c_str()); + if(emmited.find(dir) == emmited.end()) { - emmited.insert(*inc); - fout << "GetEclipsePath(*inc) + emmited.insert(dir); + fout << "GetEclipsePath(dir) << "\" kind=\"inc\" path=\"\" system=\"true\"/>\n"; } } } - fout << "\n" - ; + fout << "\n"; // add build targets fout << @@ -402,6 +537,23 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const "\n" ; emmited.clear(); + // TODO: Check how to add 'clean' target... + const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); + cmGlobalGenerator* generator + = const_cast(this->GlobalGenerator); + if (generator->GetAllTargetName()) + { + emmited.insert(generator->GetAllTargetName()); + cmExtraEclipseCDT4Generator::AppendTarget(fout, + generator->GetAllTargetName(), + make); + } + if (generator->GetPreinstallTargetName()) + { + emmited.insert(generator->GetPreinstallTargetName()); + cmExtraEclipseCDT4Generator + ::AppendTarget(fout, generator->GetPreinstallTargetName(), make); + } for (std::vector::const_iterator it = this->GlobalGenerator->GetLocalGenerators().begin(); it != this->GlobalGenerator->GetLocalGenerators().end(); @@ -413,7 +565,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const if(emmited.find(t->first) == emmited.end()) { emmited.insert(t->first); - this->AppendTarget(fout, t->first); + cmExtraEclipseCDT4Generator::AppendTarget(fout, t->first, make); } } } @@ -421,7 +573,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const "\n" ; - this->AppendStorageScanners(fout, *mf); + this->AppendStorageScanners(fout); fout << "\n" "\n" @@ -435,7 +587,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const //---------------------------------------------------------------------------- cmExtraEclipseCDT4Generator::EclipseToolchainType -cmExtraEclipseCDT4Generator::GetToolChainType(const cmMakefile& makefile) const +cmExtraEclipseCDT4Generator::GetToolChainType(const cmMakefile& makefile) { if (makefile.IsSet("UNIX")) { @@ -469,10 +621,10 @@ cmExtraEclipseCDT4Generator::GetToolChainType(const cmMakefile& makefile) const } std::string -cmExtraEclipseCDT4Generator::GetEclipsePath(const std::string& path) const +cmExtraEclipseCDT4Generator::GetEclipsePath(const std::string& path) { #if defined(__CYGWIN__) - std::string cmd = "cygpath -w " + path; + std::string cmd = "cygpath -m " + path; std::string out; if (!cmSystemTools::RunCommand(cmd.c_str(), out, 0, false)) { @@ -488,188 +640,62 @@ cmExtraEclipseCDT4Generator::GetEclipsePath(const std::string& path) const #endif } +std::string +cmExtraEclipseCDT4Generator::GetPathBasename(const std::string& path) +{ + std::string outputBasename = path; + while (outputBasename.size() > 0 && + (outputBasename[outputBasename.size() - 1] == '/' || + outputBasename[outputBasename.size() - 1] == '\\')) + { + outputBasename.resize(outputBasename.size() - 1); + } + std::string::size_type loc = outputBasename.find_last_of("/\\"); + if (loc != std::string::npos) + { + outputBasename = outputBasename.substr(loc + 1); + } + + return outputBasename; +} + //---------------------------------------------------------------------------- // Helper functions //---------------------------------------------------------------------------- void cmExtraEclipseCDT4Generator -::AppendStorageScanners(cmGeneratedFileStream& fout, - const cmMakefile& /* makefile*/) const +::AppendStorageScanners(cmGeneratedFileStream& fout) { fout << "\n" "\n" + " selectedProfileId=" + "\"org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile\"/>\n" ; - this->AppendScannerProfile(fout, + cmExtraEclipseCDT4Generator::AppendScannerProfile(fout, "org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile", true, "", true, "specsFile", "-E -P -v -dD ${plugin_state_location}/${specs_file}", "gcc", true, true); - this->AppendScannerProfile(fout, + cmExtraEclipseCDT4Generator::AppendScannerProfile(fout, "org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile", true, "", true, "makefileGenerator", "-f ${project_name}_scd.mk", "make", true, true); - this->AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - this->AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.cpp", - "g++", true, true); - this->AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.c", - "gcc", true, true); - this->AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - this->AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP" - , false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.cpp", - "g++", true, true); - this->AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.c", - "gcc", true, true); -/* - // *** this needs to be conditional on platform ??? - fout << "\n" - "\n" - ; - - AppendScannerProfile(fout, - "org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile", - true, "", true, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile", - true, "", true, "makefileGenerator", - "-f ${project_name}_scd.mk", - "make", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile", - true, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP", - true, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.cpp", - "g++", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC", - true, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.c", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile", - true, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP" - , true, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.cpp", - "g++", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC", - true, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.c", - "gcc", true, true); - - // *** this needs to be conditional on platform ??? - fout << "\n" - "\n" - "\n" - ; - - AppendScannerProfile(fout, - "org.eclipse.cdt.make.core.GCCStandardMakePerProjectProfile", - true, "", true, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile", - true, "", true, "makefileGenerator", - "-f ${project_name}_scd.mk", - "make", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfile", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.cpp", - "g++", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileC", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.c", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfile", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/${specs_file}", - "gcc", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileCPP" - , false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.cpp", - "g++", true, true); - AppendScannerProfile(fout, - "org.eclipse.cdt.managedbuilder.core.GCCWinManagedMakePerProjectProfileC", - false, "", false, "specsFile", - "-E -P -v -dD ${plugin_state_location}/specs.c", - "gcc", true, true); - - fout << "\n" - ; -*/ - - fout << "\n" - ; + fout << "\n"; } -void cmExtraEclipseCDT4Generator -::AppendTarget(cmGeneratedFileStream& fout, - const std::string& target) const +void cmExtraEclipseCDT4Generator::AppendTarget(cmGeneratedFileStream& fout, + const std::string& target, + const std::string& make) { - const cmMakefile& mf - = *(this->GlobalGenerator->GetLocalGenerators()[0]->GetMakefile()); - std::string make = mf.GetRequiredDefinition("CMAKE_MAKE_PROGRAM"); - fout << "\n" - "" << make << "\n" + "" + << cmExtraEclipseCDT4Generator::GetEclipsePath(make) + << "\n" "\n" "" << target << "\n" "true\n" @@ -688,7 +714,7 @@ void cmExtraEclipseCDT4Generator const std::string& runActionArguments, const std::string& runActionCommand, bool runActionUseDefault, - bool sipParserEnabled) const + bool sipParserEnabled) { fout << "\n" diff --git a/Source/cmExtraEclipseCDT4Generator.h b/Source/cmExtraEclipseCDT4Generator.h index 17fd10d01..4ed720fb5 100644 --- a/Source/cmExtraEclipseCDT4Generator.h +++ b/Source/cmExtraEclipseCDT4Generator.h @@ -68,26 +68,29 @@ private: EclipseToolchainSolaris, EclipseToolchainMacOSX }; - EclipseToolchainType GetToolChainType(const cmMakefile& makefile) const; + static EclipseToolchainType GetToolChainType(const cmMakefile& makefile); // If built with cygwin cmake, convert posix to windows path. - std::string GetEclipsePath(const std::string& path) const; - + static std::string GetEclipsePath(const std::string& path); + + // Extract basename. + static std::string GetPathBasename(const std::string& path); + // Helper functions - void AppendStorageScanners(cmGeneratedFileStream& fout, - const cmMakefile& makefile) const; - void AppendTarget (cmGeneratedFileStream& fout, - const std::string& target) const; - void AppendScannerProfile (cmGeneratedFileStream& fout, - const std::string& profileID, - bool openActionEnabled, - const std::string& openActionFilePath, - bool pParserEnabled, - const std::string& scannerInfoProviderID, - const std::string& runActionArguments, - const std::string& runActionCommand, - bool runActionUseDefault, - bool sipParserEnabled) const; + static void AppendStorageScanners(cmGeneratedFileStream& fout); + static void AppendTarget (cmGeneratedFileStream& fout, + const std::string& target, + const std::string& make); + static void AppendScannerProfile (cmGeneratedFileStream& fout, + const std::string& profileID, + bool openActionEnabled, + const std::string& openActionFilePath, + bool pParserEnabled, + const std::string& scannerInfoProviderID, + const std::string& runActionArguments, + const std::string& runActionCommand, + bool runActionUseDefault, + bool sipParserEnabled); }; #endif