diff options
author | Ken Martin <ken.martin@kitware.com> | 2005-03-02 15:58:13 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2005-03-02 15:58:13 (GMT) |
commit | 78d85f4af8bc77d6b429099251ca471e170f56b1 (patch) | |
tree | 3da4a8314f25053e8c697657676e9afb6cdf1372 | |
parent | 21a77046248db063447a425c93a7b3e2ed1afd53 (diff) | |
download | CMake-78d85f4af8bc77d6b429099251ca471e170f56b1.zip CMake-78d85f4af8bc77d6b429099251ca471e170f56b1.tar.gz CMake-78d85f4af8bc77d6b429099251ca471e170f56b1.tar.bz2 |
ENH: now use xcode instead
-rw-r--r-- | Source/cmGlobalCodeWarriorGenerator.cxx | 300 | ||||
-rw-r--r-- | Source/cmGlobalCodeWarriorGenerator.h | 89 | ||||
-rw-r--r-- | Source/cmLocalCodeWarriorGenerator.cxx | 1026 | ||||
-rw-r--r-- | Source/cmLocalCodeWarriorGenerator.h | 82 |
4 files changed, 0 insertions, 1497 deletions
diff --git a/Source/cmGlobalCodeWarriorGenerator.cxx b/Source/cmGlobalCodeWarriorGenerator.cxx deleted file mode 100644 index 9db7e54..0000000 --- a/Source/cmGlobalCodeWarriorGenerator.cxx +++ /dev/null @@ -1,300 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#include "cmGlobalCodeWarriorGenerator.h" -#include "cmLocalCodeWarriorGenerator.h" -#include "cmMakefile.h" -#include "cmake.h" -#include "cmTarget.h" - -void cmGlobalCodeWarriorGenerator::EnableLanguage(std::vector<std::string>const& , - cmMakefile *mf) -{ - // now load the settings - if(!mf->GetDefinition("CMAKE_ROOT")) - { - cmSystemTools::Error( - "CMAKE_ROOT has not been defined, bad GUI or driver program"); - return; - } - if(!this->GetLanguageEnabled("CXX")) - { - std::string fpath = - mf->GetRequiredDefinition("CMAKE_ROOT"); - fpath += "/Templates/CMakeCodeWarriorConfig.cmake"; - mf->ReadListFile(0,fpath.c_str()); - this->SetLanguageEnabled("CXX", mf); - } -} - -int cmGlobalCodeWarriorGenerator::TryCompile(const char *, - const char* /*bindir*/, - const char* /*projectName*/, - const char* /*targetName*/, - std::string* /*output*/, - cmMakefile* /*mf*/) -{ - return 1; -} - -///! Create a local generator appropriate to this Global Generator -cmLocalGenerator *cmGlobalCodeWarriorGenerator::CreateLocalGenerator() -{ - cmLocalGenerator *lg = new cmLocalCodeWarriorGenerator; - lg->SetGlobalGenerator(this); - return lg; -} - -void cmGlobalCodeWarriorGenerator::Generate() -{ - // first do the superclass method - this->cmGlobalGenerator::Generate(); - - // Now write out the Project File - this->OutputProject(); -} - -void cmGlobalCodeWarriorGenerator::OutputProject() -{ - // if this is an out of source build, create the output directory - if(strcmp(m_CMakeInstance->GetStartOutputDirectory(), - m_CMakeInstance->GetHomeDirectory()) != 0) - { - if(!cmSystemTools::MakeDirectory(m_CMakeInstance->GetStartOutputDirectory())) - { - cmSystemTools::Error("Error creating output directory for Project file", - m_CMakeInstance->GetStartOutputDirectory()); - } - } - // create the project file name - std::string fname; - fname = m_CMakeInstance->GetStartOutputDirectory(); - fname += "/"; - if(strlen(m_LocalGenerators[0]->GetMakefile()->GetProjectName()) == 0) - { - m_LocalGenerators[0]->GetMakefile()->SetProjectName("Project"); - } - fname += m_LocalGenerators[0]->GetMakefile()->GetProjectName(); - fname += ".xml"; - std::ofstream fout(fname.c_str()); - if(!fout) - { - cmSystemTools::Error("Error can not open project file for write: " - ,fname.c_str()); - cmSystemTools::ReportLastSystemError(""); - return; - } - this->WriteProject(fout); -} - -void cmGlobalCodeWarriorGenerator::WriteProject(std::ostream& fout) -{ - // Write out the header for a SLN file - this->WriteProjectHeader(fout); - - // start the project - fout << "<PROJECT>\n"; - - // write the target list - this->WriteTargetList(fout); - - // write the target order - this->WriteTargetOrder(fout); - - // write the group list - this->WriteGroupList(fout); - - // close the project - fout << "</PROJECT>\n"; -} - -void cmGlobalCodeWarriorGenerator::WriteProjectHeader(std::ostream& fout) -{ - fout << "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>\n"; - fout << "<?codewarrior exportversion=\"1.0.1\" ideversion=\"5.0\" ?>\n"; - - fout << "<!DOCTYPE PROJECT [\n"; - fout << "<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>\n"; - fout << "<!ELEMENT TARGETLIST (TARGET+)>\n"; - fout << "<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST)>\n"; - fout << "<!ELEMENT NAME (#PCDATA)>\n"; - fout << "<!ELEMENT USERSOURCETREETYPE (#PCDATA)>\n"; - fout << "<!ELEMENT PATH (#PCDATA)>\n"; - fout << "<!ELEMENT FILELIST (FILE*)>\n"; - fout << "<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>\n"; - fout << "<!ELEMENT PATHTYPE (#PCDATA)>\n"; - fout << "<!ELEMENT PATHROOT (#PCDATA)>\n"; - fout << "<!ELEMENT ACCESSPATH (#PCDATA)>\n"; - fout << "<!ELEMENT PATHFORMAT (#PCDATA)>\n"; - fout << "<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n"; - fout << "<!ELEMENT FILEKIND (#PCDATA)>\n"; - fout << "<!ELEMENT FILEFLAGS (#PCDATA)>\n"; - fout << "<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>\n"; - fout << "<!ELEMENT TARGETNAME (#PCDATA)>\n"; - fout << "<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>\n"; - fout << "<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>\n"; - fout << "<!ELEMENT PANELDATA (NAME, VALUE)>\n"; - fout << "<!ELEMENT VALUE (#PCDATA)>\n"; - fout << "<!ELEMENT LINKORDER (FILEREF*)>\n"; - fout << "<!ELEMENT SEGMENTLIST (SEGMENT+)>\n"; - fout << "<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>\n"; - fout << "<!ELEMENT ATTRIBUTES (#PCDATA)>\n"; - fout << "<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>\n"; - fout << "<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>\n"; - fout << "<!ELEMENT BASEADDRESS (#PCDATA)>\n"; - fout << "<!ELEMENT OVERLAY (NAME, FILEREF*)>\n"; - fout << "<!ELEMENT SUBTARGETLIST (SUBTARGET+)>\n"; - fout << "<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)>\n"; - fout << "<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>\n"; - fout << "<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>\n"; - fout << "<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>\n"; - fout << "<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)>\n"; - fout << "<!ELEMENT FRAMEWORKLIST (FRAMEWORK+)>\n"; - fout << "<!ELEMENT FRAMEWORK (FILEREF, LIBRARYFILE?, VERSION?)>\n"; - fout << "<!ELEMENT LIBRARYFILE (FILEREF)>\n"; - fout << "<!ELEMENT VERSION (#PCDATA)>\n"; - fout << "<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>\n"; - fout << "<!ELEMENT ORDEREDTARGET (NAME)>\n"; - fout << "<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>\n"; - fout << "<!ELEMENT GROUPLIST (GROUP|FILEREF)*>\n"; - fout << "<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>\n"; - fout << "<!ELEMENT DESIGNLIST (DESIGN+)>\n"; - fout << "<!ELEMENT DESIGN (NAME, DESIGNDATA)>\n"; - fout << "<!ELEMENT DESIGNDATA (#PCDATA)>\n"; - fout << "]>\n\n"; -} - -void cmGlobalCodeWarriorGenerator::WriteTargetList(std::ostream& fout) -{ - fout << "<TARGETLIST>\n"; - - unsigned int i; - // for each local generator - for (i = 0; i < m_LocalGenerators.size(); ++i) - { - static_cast<cmLocalCodeWarriorGenerator *>(m_LocalGenerators[i])->WriteTargets(fout); - } - fout << "</TARGETLIST>\n"; -} - -cmTarget *cmGlobalCodeWarriorGenerator::GetTargetFromName(const char *tgtName) -{ - // for each local generator, and each target - unsigned int i; - for(i = 0; i < m_LocalGenerators.size(); ++i) - { - cmMakefile* mf = m_LocalGenerators[i]->GetMakefile(); - cmTargets &tgts = mf->GetTargets(); - for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) - { - if (l->first == tgtName) - { - return &(l->second); - } - } - } - return 0; -} - -void cmGlobalCodeWarriorGenerator::ComputeTargetOrder( - std::vector<std::string> &tgtOrder, const char *tgtName, - cmTarget const *target) -{ - // if the target is already listed then we are done - if (std::find(tgtOrder.begin(),tgtOrder.end(),tgtName) != tgtOrder.end()) - { - return; - } - - // otherwise find all this target depends on and add them first - cmTarget::LinkLibraries::const_iterator j, jend; - j = target->GetLinkLibraries().begin(); - jend = target->GetLinkLibraries().end(); - for(;j!= jend; ++j) - { - if(j->first != tgtName) - { - // is the library part of this Project ? - std::string libPath = j->first + "_CMAKE_PATH"; - const char* cacheValue - = m_CMakeInstance->GetCacheDefinition(libPath.c_str()); - if(cacheValue && *cacheValue) - { - // so add it to the tgtOrder vector if it isn't already there - // to do this we need the actual target - cmTarget *tgt = this->GetTargetFromName(j->first.c_str()); - this->ComputeTargetOrder(tgtOrder,j->first.c_str(), tgt); - } - } - } - // finally add the target - tgtOrder.push_back(tgtName); -} - -void cmGlobalCodeWarriorGenerator::WriteTargetOrder(std::ostream& fout) -{ - fout << "<TARGETORDER>\n"; - - std::vector<std::string> tgtOrder; - unsigned int i; - // for each local generator, and each target - for(i = 0; i < m_LocalGenerators.size(); ++i) - { - cmMakefile* mf = m_LocalGenerators[i]->GetMakefile(); - cmTargets &tgts = mf->GetTargets(); - for(cmTargets::iterator l = tgts.begin(); l != tgts.end(); ++l) - { - this->ComputeTargetOrder(tgtOrder, l->first.c_str(), &(l->second)); - } - } - - // now write out the target order - for(i = 0; i < tgtOrder.size(); ++i) - { - fout << "<ORDEREDTARGET><NAME>" << tgtOrder[i] - << "</NAME></ORDEREDTARGET>\n"; - } - fout << "</TARGETORDER>\n"; -} - -void cmGlobalCodeWarriorGenerator::WriteGroupList(std::ostream& fout) -{ - fout << "<GROUPLIST>\n"; - - unsigned int i; - // for each local generator - for (i = 0; i < m_LocalGenerators.size(); ++i) - { - static_cast<cmLocalCodeWarriorGenerator *>(m_LocalGenerators[i])->WriteGroups(fout); - } - - - fout << "</GROUPLIST>\n"; -} - -void cmGlobalCodeWarriorGenerator::LocalGenerate() -{ - this->cmGlobalGenerator::LocalGenerate(); -} - - -//---------------------------------------------------------------------------- -void cmGlobalCodeWarriorGenerator::GetDocumentation(cmDocumentationEntry& entry) const -{ - entry.name = this->GetName(); - entry.brief = "Generates CodeWarrior project files."; - entry.full = ""; -} diff --git a/Source/cmGlobalCodeWarriorGenerator.h b/Source/cmGlobalCodeWarriorGenerator.h deleted file mode 100644 index 4549f68..0000000 --- a/Source/cmGlobalCodeWarriorGenerator.h +++ /dev/null @@ -1,89 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef cmGlobalCodeWarriorGenerator_h -#define cmGlobalCodeWarriorGenerator_h - -#include "cmGlobalGenerator.h" - -class cmTarget; - -/** \class cmGlobalCodeWarriorGenerator - * \brief Write a Unix makefiles. - * - * cmGlobalCodeWarriorGenerator manages UNIX build process for a tree - */ -class cmGlobalCodeWarriorGenerator : public cmGlobalGenerator -{ -public: - static cmGlobalGenerator* New() { return new cmGlobalCodeWarriorGenerator; } - - ///! Get the name for the generator. - virtual const char* GetName() const { - return cmGlobalCodeWarriorGenerator::GetActualName();} - static const char* GetActualName() {return "Code Warrior Not Working";} - - /** Get the documentation entry for this generator. */ - virtual void GetDocumentation(cmDocumentationEntry& entry) const; - - ///! Create a local generator appropriate to this Global Generator - virtual cmLocalGenerator *CreateLocalGenerator(); - - /** - * Try to determine system infomation such as shared library - * extension, pthreads, byte order etc. - */ - virtual void EnableLanguage(std::vector<std::string>const& languages, cmMakefile *); - - /** - * Try running cmake and building a file. This is used for dynalically - * loaded commands, not as part of the usual build process. - */ - virtual int TryCompile(const char *srcdir, const char *bindir, - const char *projectName, const char *targetName, - std::string *output, cmMakefile* mf); - - /** - * Generate the all required files for building this project/tree. This - * basically creates a series of LocalGenerators for each directory and - * requests that they Generate. - */ - virtual void Generate(); - - /** - * Generate the required files for building this directory. This - * basically creates a single LocalGenerators and - * requests that it Generate. - */ - virtual void LocalGenerate(); - - /** - * Generate the DSW workspace file. - */ - virtual void OutputProject(); - -private: - cmTarget *GetTargetFromName(const char *tgtName); - void WriteProject(std::ostream & fout); - void WriteProjectHeader(std::ostream & fout); - void WriteTargetList(std::ostream & fout); - void WriteTargetOrder(std::ostream & fout); - void WriteGroupList(std::ostream & fout); - void ComputeTargetOrder(std::vector<std::string> &tgtOrder, - const char *tgtName, cmTarget const *tgt); -}; - -#endif diff --git a/Source/cmLocalCodeWarriorGenerator.cxx b/Source/cmLocalCodeWarriorGenerator.cxx deleted file mode 100644 index f1bcd77..0000000 --- a/Source/cmLocalCodeWarriorGenerator.cxx +++ /dev/null @@ -1,1026 +0,0 @@ -/*========================================================================= - -Program: CMake - Cross-Platform Makefile Generator -Module: $RCSfile$ -Language: C++ -Date: $Date$ -Version: $Revision$ - -Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. -See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - -This software is distributed WITHOUT ANY WARRANTY; without even -the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#include "cmGlobalCodeWarriorGenerator.h" -#include "cmLocalCodeWarriorGenerator.h" -#include "cmMakefile.h" -#include "cmSystemTools.h" -#include "cmSourceFile.h" -#include "cmCacheManager.h" -#include "cmake.h" - -#include <cmsys/RegularExpression.hxx> - -cmLocalCodeWarriorGenerator::cmLocalCodeWarriorGenerator() -{ -} - -cmLocalCodeWarriorGenerator::~cmLocalCodeWarriorGenerator() -{ -} - - -void cmLocalCodeWarriorGenerator::Generate(bool /* fromTheTop */) -{ - -} - -void cmLocalCodeWarriorGenerator::WriteTargets(std::ostream& fout) -{ - // collect up the output names - // we do this here so any dependencies between targets will work, - // even if they are forward declared in the previous targets - cmTargets &tgts = m_Makefile->GetTargets(); - - for(cmTargets::iterator l = tgts.begin(); - l != tgts.end(); l++) - { - std::string targetOutputName = l->first; - switch (l->second.GetType()) - { - case cmTarget::STATIC_LIBRARY: - targetOutputName += ".lib"; - break; - case cmTarget::SHARED_LIBRARY: - case cmTarget::MODULE_LIBRARY: - targetOutputName += ".dylib"; - break; - case cmTarget::EXECUTABLE: - targetOutputName += cmSystemTools::GetExecutableExtension(); - break; - default:; - } - - m_TargetOutputFiles[l->first] = targetOutputName; - } - - // write out the individual targets - for(cmTargets::iterator l = tgts.begin(); - l != tgts.end(); l++) - { - this->WriteTarget(fout,l->first.c_str(),&(l->second)); - } -} - -void cmLocalCodeWarriorGenerator::WriteTarget(std::ostream& fout, - const char *tgtName, - cmTarget const *l) -{ - fout << "<TARGET>\n"; - fout << "<NAME>" << tgtName << "</NAME>\n"; - - this->WriteSettingList(fout, tgtName,l); - this->WriteFileList(fout, tgtName,l); - this->WriteLinkOrder(fout, tgtName, l); - // this->WriteSubTargetList(fout,l); - - fout << "</TARGET>\n"; -} - -void cmLocalCodeWarriorGenerator::AddFileMapping(std::ostream& fout, - const char *ftype, - const char *ext, - const char *comp, - const char *edit, - bool precomp, - bool launch, - bool res, - bool ignored) -{ - fout << "<SETTING>\n"; - if( strlen( ftype ) > 0 ) - { - fout << "<SETTING><NAME>FileType</NAME><VALUE>" << ftype << - "</VALUE></SETTING>\n"; - } - fout << "<SETTING><NAME>FileExtension</NAME><VALUE>" << ext << - "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>Compiler</NAME><VALUE>" << comp << - "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>EditLanguage</NAME><VALUE>" << edit << - "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>Precompile</NAME><VALUE>" - << (precomp ? "true" : "false") << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>Launchable</NAME><VALUE>" - << (launch ? "true" : "false") << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>ResourceFile</NAME><VALUE>" - << (res ? "true" : "false") << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>IgnoredByMake</NAME><VALUE>" - << (ignored ? "true" : "false") << "</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; -} - - -void cmLocalCodeWarriorGenerator::WriteSettingList(std::ostream& fout, - const char *tgtName, - cmTarget const *l) -{ - fout << "<SETTINGLIST>\n"; - - fout << "<SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING>\n"; - - fout << "<SETTING><NAME>UserSearchPaths</NAME>\n"; - - // project relative path - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - - // list the include paths -/* std::vector<std::string>& includes = l->GetIncludeDirectories(); - std::vector<std::string>::iterator i = includes.begin(); - for(;i != includes.end(); ++i) - { - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>" << i->c_str() << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - }*/ - - // library paths - - // now add in the libraries we depend on - cmsys::RegularExpression isAframework("[ \t]*\\-framework"); - cmsys::RegularExpression isEnvironment("\\${"); - cmsys::RegularExpression isUNIX("[ \t]*\\-l([^ \t]+)"); - const cmTarget::LinkLibraries& libs = l->GetLinkLibraries(); - cmTarget::LinkLibraries::const_iterator lib = libs.begin(); - for(; lib != libs.end(); ++lib) - { - // no frameworks! - if( isAframework.find( lib->first.c_str() ) ) continue; - - // no environment variables! - if( isEnvironment.find( lib->first.c_str() ) ) continue; - - std::string libPath = lib->first + "_CMAKE_PATH"; - // is this lib part of this project? Look in the cache - const char* cacheValue - = GetGlobalGenerator()->GetCMakeInstance() - ->GetCacheDefinition(libPath.c_str()); - - if( cacheValue && *cacheValue ) - { - // just tack it on - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>" << cacheValue << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - } - } - - const std::vector<std::string>& links = l->GetLinkDirectories(); - std::vector<std::string>::const_iterator j = links.begin(); - for(;j != links.end(); ++j) - { - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>" << j->c_str() << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - } - fout << "</SETTING>\n"; - - // system include and library paths - fout << "<SETTING><NAME>SystemSearchPaths</NAME>\n"; - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:MacOS X Support:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:usr:include:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:usr:lib:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:System:Library:Frameworks:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING>\n"; - fout << "<SETTING><NAME>SearchPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:Library:Frameworks:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>OS X Volume</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>FrameworkPath</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "</SETTING>\n"; - - fout << "<SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWRuntimeSettings_HostApplication</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING>\n"; - - // <!-- Settings for "Target Settings" panel --> - if( l->GetType() == cmTarget::SHARED_LIBRARY || - l->GetType() == cmTarget::MODULE_LIBRARY ) - { - fout << "<SETTING><NAME>Linker</NAME><VALUE>Mach-O PPC Linker</VALUE></SETTING>\n"; - } - else - { - fout << "<SETTING><NAME>Linker</NAME><VALUE>MacOS X PPC Linker</VALUE></SETTING>\n"; - } - fout << "<SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>Targetname</NAME><VALUE>" << tgtName - << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>OutputDirectory</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Unix</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>\n"; - - // add the cxx file type, and others - fout << "<SETTING><NAME>FileMappings</NAME>\n"; - - if( l->GetType() == cmTarget::SHARED_LIBRARY || - l->GetType() == cmTarget::MODULE_LIBRARY ) - { - this->AddFileMapping(fout,"TEXT",".cxx","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cpp","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".c","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cc","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cp","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cpp","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".h","MW C/C++ MachPPC","C/C++", - false,false,false,true); - this->AddFileMapping(fout,"TEXT",".hpp","MW C/C++ MachPPC","C/C++", - false,false,false,true); - this->AddFileMapping(fout,"TEXT",".m","MW C/C++ MachPPC","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".mm","MW C/C++ MachPPC","C/C++", - false,false,false,false); - } - else - { - this->AddFileMapping(fout,"TEXT",".cxx","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cpp","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".c","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cc","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cp","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".cpp","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".h","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,true); - this->AddFileMapping(fout,"TEXT",".hpp","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,true); - this->AddFileMapping(fout,"TEXT",".m","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"TEXT",".mm","MW C/C++ PPC Mac OS X","C/C++", - false,false,false,false); - } - this->AddFileMapping(fout,"",".lib","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"",".dylib","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"",".a","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"",".o","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"MDYL","","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"MLIB","","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"MMLB","","MachO Importer","C/C++", - false,false,false,false); - this->AddFileMapping(fout,"MPLF","","MachO Importer","C/C++", - false,false,false,false); - fout << "</SETTING>\n"; - - // <!-- Settings for "Build Extras" panel --> - fout << "<SETTING><NAME>CacheModDates</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>CacheSubprojects</NAME><VALUE>true</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>BrowserGenerator</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>DebuggerAppPath</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>DebuggerWorkingDir</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>CodeCompletionPrefixFileName</NAME>" - << "<VALUE>MacHeadersMach-O.c</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>CodeCompletionMacroFileName</NAME>" - << "<VALUE>MacOSX_MSL_C++_Macros.h</VALUE></SETTING>\n"; - - fout << "<SETTING><NAME>MWFrontEnd_C_prefixname</NAME>" - << "<VALUE>MSLCarbonPrefix.h</VALUE></SETTING>"; - - // <!-- Settings for "PPC Mac OS X Linker" panel --> - fout << "<SETTING><NAME>MWLinker_MacOSX_linksym</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_symfullpath</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_nolinkwarnings</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_linkmap</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_use_objectivec_semantics</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_strip_debug_symbols</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_split_segs</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_report_msl_overloads</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_objects_follow_linkorder</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_linkmode</NAME><VALUE>Fast</VALUE></SETTING>\n"; - switch (l->GetType()) - { - case cmTarget::STATIC_LIBRARY: - case cmTarget::SHARED_LIBRARY: - case cmTarget::MODULE_LIBRARY: - fout << "<SETTING><NAME>MWLinker_MacOSX_exports</NAME><VALUE>All</VALUE></SETTING>\n"; - break; - - default: - fout << "<SETTING><NAME>MWLinker_MacOSX_exports</NAME><VALUE>ReferencedGlobals</VALUE></SETTING>\n"; - } - fout << "<SETTING><NAME>MWLinker_MacOSX_sortcode</NAME><VALUE>None</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MacOSX_mainname</NAME><VALUE>start</VALUE></SETTING>\n"; - - // <!-- Settings for "PPC Mac OS X Project" panel --> - fout << "<SETTING><NAME>MWProject_MacOSX_type</NAME><VALUE>"; - - std::string targetOutputType; - switch (l->GetType()) - { - case cmTarget::STATIC_LIBRARY: - targetOutputType = "MMLB"; - fout << "Library"; - break; - case cmTarget::SHARED_LIBRARY: - case cmTarget::MODULE_LIBRARY: - targetOutputType = "MDYL"; - fout << "SharedLibrary"; - break; - case cmTarget::EXECUTABLE: - targetOutputType = "APPL"; - fout << "ApplicationPackage"; - break; - default:; - } - fout << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_outfile</NAME><VALUE>"; - fout << m_TargetOutputFiles[std::string(tgtName)]; - fout << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_filetype</NAME><VALUE>"; - fout << targetOutputType << "</VALUE></SETTING>\n"; - - fout << "<SETTING><NAME>MWProject_MacOSX_vmaddress</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_usedefaultvmaddr</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_flatrsrc</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_flatrsrcfilename</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_flatrsrcoutputdir</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_installpath</NAME><VALUE>./</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_dont_prebind</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_flat_namespace</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_frameworkversion</NAME><VALUE>A</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_currentversion</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MacOSX_flat_oldimpversion</NAME><VALUE>0</VALUE></SETTING>\n"; - - // <!-- Settings for "PPC Mach-O Linker" panel --> - fout << "<SETTING><NAME>MWLinker_MachO_exports</NAME><VALUE>All</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_mainname</NAME><VALUE>start</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_currentversion</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_compatibleversion</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_symfullpath</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_supresswarnings</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_multisymerror</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_prebind</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_deadstrip</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_objectivecsemantics</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_whichfileloaded</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_whyfileloaded</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_readonlyrelocs</NAME><VALUE>Errors</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_undefinedsymbols</NAME><VALUE>Errors</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_twolevelnamespace</NAME><VALUE>1</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWLinker_MachO_stripdebugsymbols</NAME><VALUE>0</VALUE></SETTING>\n"; - - // <!-- Settings for "PPC Mach-O Target" panel --> - fout << "<SETTING><NAME>MWProject_MachO_type</NAME><VALUE>"; - switch (l->GetType()) - { - case cmTarget::STATIC_LIBRARY: - targetOutputType = "MMLB"; - fout << "Library"; - break; - case cmTarget::SHARED_LIBRARY: - case cmTarget::MODULE_LIBRARY: - targetOutputType = "MDYL"; - fout << "SharedLibrary"; - break; - case cmTarget::EXECUTABLE: - targetOutputType = "APPL"; - fout << "ApplicationPackage"; - break; - default:; - } - fout << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_outfile</NAME><VALUE>"; - fout << m_TargetOutputFiles[std::string(tgtName)]; - fout << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_filecreator</NAME><VALUE>????" << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_filetype</NAME><VALUE>"; - fout << targetOutputType; - fout << "</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_vmaddress</NAME><VALUE>4096</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_flatrsrc</NAME><VALUE>0</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_flatrsrcfilename</NAME><VALUE></VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_flatrsrcoutputdir</NAME>\n"; - fout << "<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>\n"; - fout << "</SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_installpath</NAME><VALUE>./</VALUE></SETTING>\n"; - fout << "<SETTING><NAME>MWProject_MachO_frameworkversion</NAME><VALUE></VALUE></SETTING>\n"; - - fout << "</SETTINGLIST>\n"; -} - -void cmLocalCodeWarriorGenerator::WriteFileList(std::ostream& fout, - const char* /*tgtName*/, - cmTarget const *l) -{ - fout << "<FILELIST>\n"; - - // for each file - std::vector<cmSourceFile*> const& classes = l->GetSourceFiles(); - for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); - i != classes.end(); i++) - { - // Add the file to the list of sources. - std::string source = (*i)->GetFullPath(); - fout << "<FILE>\n"; - fout << "<PATHTYPE>Absolute</PATHTYPE>\n"; - fout << "<PATHROOT>Absolute</PATHROOT>\n"; - //fout << "<ACCESSPATH>common</ACCESSPATH>\n"; - fout << "<PATH>" << source << "</PATH>\n"; - fout << "<PATHFORMAT>Generic</PATHFORMAT>\n"; - fout << "<FILEKIND>Text</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - } - - // now add in the libraries we depend on - cmsys::RegularExpression isAframework("[ \t]*\\-framework"); - cmsys::RegularExpression isEnvironment("\\${"); - cmsys::RegularExpression isUNIX("[ \t]*\\-l([^ \t]+)"); - const cmTarget::LinkLibraries& libs = l->GetLinkLibraries(); - cmTarget::LinkLibraries::const_iterator lib = libs.begin(); - for(; lib != libs.end(); ++lib) - { - // no frameworks! - if( isAframework.find( lib->first.c_str() ) ) continue; - - // no environment variables! - if( isEnvironment.find( lib->first.c_str() ) ) continue; - - std::string libPath = lib->first + "_CMAKE_PATH"; - // is this lib part of this project? Look in the cache - const char* cacheValue - = GetGlobalGenerator()->GetCMakeInstance() - ->GetCacheDefinition(libPath.c_str()); - - if( cacheValue && *cacheValue ) - { - // just tack it on - fout << "<FILE>\n"; - fout << "<PATHTYPE>RootRelative</PATHTYPE>\n"; - fout << "<PATHROOT>Project</PATHROOT>\n"; - fout << "<PATH>" << m_TargetOutputFiles[lib->first] << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "<FILEKIND>Library</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug, TargetOutputFile</FILEFLAGS>\n"; - fout << "</FILE>\n"; - } - else if( lib->first.find('/') != std::string::npos ) - { - // it's a path-based library, so we'll include it directly by path - fout << "<FILE>\n"; - fout << "<PATHTYPE>Absolute</PATHTYPE>\n"; - fout << "<PATHROOT>Absolute</PATHROOT>\n"; - fout << "<PATH>" << lib->first.c_str() << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "<FILEKIND>Text</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - } - else if( isUNIX.find( lib->first.c_str() ) ) - { - // now we need to search the library directories for this - // library name, and if we don't find it, we have to search - // in the cache to see if there's a target defining that lib. - // for the first search, we have to check for - // [lib]<name>[.<a|lib|so|dylib|dll>] - std::string libName = isUNIX.match(1); - } - else - { - // just tack it on - fout << "<FILE>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>" << lib->first.c_str() << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "<FILEKIND>Library</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - } - } - - // now add in the system libs (for an executable) - if (l->GetType() == cmTarget::EXECUTABLE) - { - fout << "<FILE>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>crt1.o</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "<FILEKIND>Library</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - fout << "<FILE>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>MSL_All_Mach-O.lib</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "<FILEKIND>Library</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - fout << "<FILE>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>console_OS_X.c</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "<FILEKIND>Text</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - } - // or a dynamic library -/* else if (l->GetType() == cmTarget::SHARED_LIBRARY || - l->GetType() == cmTarget::MODULE_LIBRARY) - { - fout << "<FILE>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>dylib1.o</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "<FILEKIND>Library</FILEKIND>\n"; - fout << "<FILEFLAGS>Debug</FILEFLAGS>\n"; - fout << "</FILE>\n"; - }*/ - - fout << "</FILELIST>\n"; -} - - -void cmLocalCodeWarriorGenerator::WriteLinkOrder(std::ostream& fout, - const char* tgtName, - cmTarget const *l) -{ - fout << "<LINKORDER>\n"; - - // for each file - std::vector<cmSourceFile*> const& classes = l->GetSourceFiles(); - for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); - i != classes.end(); i++) - { - // Add the file to the list of sources. - std::string source = (*i)->GetFullPath(); - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Absolute</PATHTYPE>\n"; - fout << "<PATHROOT>Absolute</PATHROOT>\n"; - //fout << "<ACCESSPATH>common</ACCESSPATH>\n"; - fout << "<PATH>" << source << "</PATH>\n"; - fout << "<PATHFORMAT>Generic</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - - // now add in the libraries we depend on - cmsys::RegularExpression isAframework("[ \t]*\\-framework"); - cmsys::RegularExpression isEnvironment("\\${"); - cmsys::RegularExpression isUNIX("[ \t]*\\-l([^ \t]+)"); - const cmTarget::LinkLibraries& libs = l->GetLinkLibraries(); - cmTarget::LinkLibraries::const_iterator lib = libs.begin(); - - std::map<std::string, std::string> referencedTargets; - - for(; lib != libs.end(); ++lib) - { - // no frameworks! - if( isAframework.find( lib->first.c_str() ) ) continue; - - // no environment variables! - if( isEnvironment.find( lib->first.c_str() ) ) continue; - - std::string libPath = lib->first + "_CMAKE_PATH"; - // is this lib part of this project? Look in the cache - const char* cacheValue - = GetGlobalGenerator()->GetCMakeInstance() - ->GetCacheDefinition(libPath.c_str()); - - if( cacheValue && *cacheValue ) - { - // just tack it on - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>RootRelative</PATHTYPE>\n"; - fout << "<PATHROOT>Project</PATHROOT>\n"; - fout << "<PATH>" << m_TargetOutputFiles[lib->first] << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - referencedTargets[lib->first] = m_TargetOutputFiles[lib->first]; - if( m_TargetReferencingList.count(m_TargetOutputFiles[lib->first]) == 0 ) - { - m_TargetReferencingList[m_TargetOutputFiles[lib->first]] = std::string(tgtName); - } - } - else if( lib->first.find('/') != std::string::npos ) - { - // it's a path-based library, so we'll include it directly by path - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Absolute</PATHTYPE>\n"; - fout << "<PATHROOT>Absolute</PATHROOT>\n"; - fout << "<PATH>" << lib->first.c_str() << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - else if( isUNIX.find( lib->first.c_str() ) ) - { - // now we need to search the library directories for this - // library name, and if we don't find it, we have to search - // in the cache to see if there's a target defining that lib. - // for the first search, we have to check for - // [lib]<name>[.<a|lib|so|dylib|dll>] - std::string libName = isUNIX.match(1); - } - else - { - // just tack it on - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>" << lib->first.c_str() << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - } - - // now add in the system libs (for an executable) - if (l->GetType() == cmTarget::EXECUTABLE) - { - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>crt1.o</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>MSL_All_Mach-O.lib</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>console_OS_X.c</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - // or a shared library -/* else if (l->GetType() == cmTarget::SHARED_LIBRARY || - l->GetType() == cmTarget::MODULE_LIBRARY) - { - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>dylib1.o</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - }*/ - - fout << "</LINKORDER>\n"; - - if( referencedTargets.size() ) - { - fout << "<SUBTARGETLIST>\n"; - // output subtarget list - std::map<std::string, std::string>::const_iterator target = referencedTargets.begin(); - for( ; target != referencedTargets.end(); target++ ) - { - fout << "<SUBTARGET>\n"; - fout << "<TARGETNAME>" << target->first << "</TARGETNAME>\n"; - fout << "<ATTRIBUTES>LinkAgainst</ATTRIBUTES>\n"; - fout << "<FILEREF>\n<PATHTYPE>RootRelative</PATHTYPE>\n" - << "<PATHROOT>Project</PATHROOT>\n" - << "<PATH>" << target->second << "</PATH>\n" - << "<PATHFORMAT>Unix</PATHFORMAT></FILEREF>\n"; - fout << "</SUBTARGET>\n"; - } - fout << "</SUBTARGETLIST>\n"; - } - - // we need at least one framework for the XML to be valid - // generate framework list - cmsys::RegularExpression reg("[ \t]*\\-framework[ \t]+([^ \t]+)"); - std::vector<std::string> frameworks; - - lib = libs.begin(); - for(; lib != libs.end(); ++lib) - { - if( reg.find( lib->first.c_str() ) ) - { - frameworks.push_back( reg.match(1) ); - } - } - - if( frameworks.size() > 0 || l->GetType() == cmTarget::EXECUTABLE ) - { - fout << "<FRAMEWORKLIST>\n"; - - std::vector<std::string>::const_iterator framework = frameworks.begin(); - for(; framework != frameworks.end(); ++framework) - { - fout << "<FRAMEWORK>\n"; - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>" << framework->c_str() << ".framework</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - // this isn't strictly always true, I believe, but Apple adheres to it - fout << "<DYNAMICLIBRARY>" << framework->c_str() << "</DYNAMICLIBRARY>\n"; - fout << "</FRAMEWORK>\n"; - } - - // if it's an executable, it needs to link into System.framework - if (l->GetType() == cmTarget::EXECUTABLE) - { - fout << "<FRAMEWORK>\n"; - fout << "<FILEREF>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>System.framework</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "<DYNAMICLIBRARY>System</DYNAMICLIBRARY>\n"; - fout << "</FRAMEWORK>\n"; - } - - fout << "</FRAMEWORKLIST>\n"; - } -} - -void cmLocalCodeWarriorGenerator::WriteGroups(std::ostream& fout) -{ - bool hasExecutableTarget = false, hasDynamicLibTarget = false; - char *firstExecutableTarget = 0, *firstDynamicLibTarget = 0; - cmTargets &tgts = m_Makefile->GetTargets(); - for(cmTargets::iterator l = tgts.begin(); - l != tgts.end(); l++) - { - this->WriteGroup(fout,l->first.c_str(),&(l->second)); - if (l->second.GetType() == cmTarget::EXECUTABLE) - { - hasExecutableTarget = true; - if (firstExecutableTarget == 0) - { - firstExecutableTarget = const_cast<char*>(l->first.c_str()); - } - } - else if (l->second.GetType() == cmTarget::SHARED_LIBRARY || - l->second.GetType() == cmTarget::MODULE_LIBRARY) - { - hasDynamicLibTarget = true; - if (firstDynamicLibTarget == 0) - { - firstDynamicLibTarget = const_cast<char*>(l->first.c_str()); - } - } - } - - // write out the libraries groups - if( hasExecutableTarget ) - { - fout << "<GROUP><NAME>" << "App Support" << "</NAME>\n"; - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << firstExecutableTarget << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>crt1.o</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << firstExecutableTarget << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>MSL_All_Mach-O.lib</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << firstExecutableTarget << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>console_OS_X.c</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "</GROUP>\n"; - } -/* if (hasDynamicLibTarget) - { - fout << "<GROUP><NAME>" << "dylib Support" << "</NAME>\n"; - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << firstDynamicLibTarget << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>dylib1.o</PATH>\n"; - fout << "<PATHFORMAT>MacOS</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - fout << "</GROUP>\n"; - }*/ - - // write out the referenced targets group - if( m_TargetReferencingList.size() > 0 ) - { - fout << "<GROUP><NAME>Subtarget Files</NAME>\n"; - - std::map<std::string, std::string>::const_iterator subtarget = m_TargetReferencingList.begin(); - for( ; subtarget != m_TargetReferencingList.end(); subtarget++ ) - { - fout << "<FILEREF>\n" - << "<TARGETNAME>" << subtarget->second << "</TARGETNAME>\n"; - fout << "<PATHTYPE>RootRelative</PATHTYPE>\n<PATHROOT>Project</PATHROOT>\n"; - fout << "<PATH>" << subtarget->first << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>"; - } - - fout << "</GROUP>"; - } -} - -void cmLocalCodeWarriorGenerator::WriteGroup(std::ostream& fout, - const char *tgtName, - cmTarget const *l) -{ - fout << "<GROUP><NAME>" << tgtName << "</NAME>\n"; - - // for each file - std::vector<cmSourceFile*> const& classes = l->GetSourceFiles(); - for(std::vector<cmSourceFile*>::const_iterator i = classes.begin(); - i != classes.end(); i++) - { - std::string source = (*i)->GetFullPath(); - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << tgtName << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Absolute</PATHTYPE>\n"; - fout << "<PATHROOT>Absolute</PATHROOT>\n"; - fout << "<PATH>" << source << "</PATH>\n"; - fout << "<PATHFORMAT>Generic</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - - // now add in the libraries we depend on - cmsys::RegularExpression isAframework("[ \t]*\\-framework"); - cmsys::RegularExpression isEnvironment("\\${"); - cmsys::RegularExpression isUNIX("[ \t]*\\-l([^ \t]+)"); - const cmTarget::LinkLibraries& libs = l->GetLinkLibraries(); - cmTarget::LinkLibraries::const_iterator lib = libs.begin(); - for(; lib != libs.end(); ++lib) - { - // no frameworks! - if( isAframework.find( lib->first.c_str() ) ) continue; - - // no environment variables! - if( isEnvironment.find( lib->first.c_str() ) ) continue; - - std::string libPath = lib->first + "_CMAKE_PATH"; - // is this lib part of this project? Look in the cache - const char* cacheValue - = GetGlobalGenerator()->GetCMakeInstance() - ->GetCacheDefinition(libPath.c_str()); - - if( cacheValue && *cacheValue ) - { - // this is a subtarget reference, it will be taken care of later - continue; - } - else if( lib->first.find('/') != std::string::npos ) - { - // it's a path-based library, so we'll include it directly by path - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << tgtName << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Absolute</PATHTYPE>\n"; - fout << "<PATHROOT>Absolute</PATHROOT>\n"; - fout << "<PATH>" << lib->first.c_str() << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - else if( isUNIX.find( lib->first.c_str() ) ) - { - // now we need to search the library directories for this - // library name, and if we don't find it, we have to search - // in the cache to see if there's a target defining that lib. - // for the first search, we have to check for - // [lib]<name>[.<a|lib|so|dylib|dll>] - std::string libName = isUNIX.match(1); - } - else - { - // just tack it on - fout << "<FILEREF>\n"; - fout << "<TARGETNAME>" << tgtName << "</TARGETNAME>\n"; - fout << "<PATHTYPE>Name</PATHTYPE>\n"; - fout << "<PATH>" << lib->first.c_str() << "</PATH>\n"; - fout << "<PATHFORMAT>Unix</PATHFORMAT>\n"; - fout << "</FILEREF>\n"; - } - } - - fout << "</GROUP>\n"; -} diff --git a/Source/cmLocalCodeWarriorGenerator.h b/Source/cmLocalCodeWarriorGenerator.h deleted file mode 100644 index c415bc4..0000000 --- a/Source/cmLocalCodeWarriorGenerator.h +++ /dev/null @@ -1,82 +0,0 @@ -/*========================================================================= - - Program: CMake - Cross-Platform Makefile Generator - Module: $RCSfile$ - Language: C++ - Date: $Date$ - Version: $Revision$ - - Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. - See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. - - This software is distributed WITHOUT ANY WARRANTY; without even - the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - PURPOSE. See the above copyright notices for more information. - -=========================================================================*/ -#ifndef cmLocalCodeWarriorGenerator_h -#define cmLocalCodeWarriorGenerator_h - -#include "cmLocalGenerator.h" - -class cmMakeDepend; -class cmTarget; -class cmSourceFile; - -// please remove me.... Yuck -#include "cmSourceGroup.h" - -/** \class cmLocalCodeWarriorGenerator - * \brief Write a LocalUnix makefiles. - * - * cmLocalCodeWarriorGenerator produces a LocalUnix makefile from its - * member m_Makefile. - */ -class cmLocalCodeWarriorGenerator : public cmLocalGenerator -{ -public: - ///! Set cache only and recurse to false by default. - cmLocalCodeWarriorGenerator(); - - virtual ~cmLocalCodeWarriorGenerator(); - - /** - * Generate the makefile for this directory. fromTheTop indicates if this - * is being invoked as part of a global Generate or specific to this - * directory. The difference is that when done from the Top we might skip - * some steps to save time, such as dependency generation for the - * makefiles. This is done by a direct invocation from make. - */ - virtual void Generate(bool fromTheTop); - - enum BuildType {STATIC_LIBRARY, DLL, EXECUTABLE, WIN32_EXECUTABLE, UTILITY}; - - /** - * Specify the type of the build: static, dll, or executable. - */ - void SetBuildType(BuildType,const char *name); - - void WriteTargets(std::ostream& fout); - void WriteGroups(std::ostream& fout); - -private: - void WriteTarget(std::ostream& fout, const char *name, cmTarget const *l); - void WriteGroup(std::ostream& fout, const char *name, cmTarget const *l); - void WriteSettingList(std::ostream& fout, const char *name, - cmTarget const *l); - void WriteFileList(std::ostream& fout, const char *name, cmTarget const *l); - void WriteLinkOrder(std::ostream& fout, const char *name, cmTarget const *l); - void AddFileMapping(std::ostream& fout, const char *ftype, - const char *ext, const char *comp, - const char *edit, bool precomp, - bool launch, bool res, bool ignored); - -private: - // lists the names of the output files of the various targets - std::map<std::string, std::string> m_TargetOutputFiles; - // lists which target first references another target's output - std::map<std::string, std::string> m_TargetReferencingList; -}; - -#endif - |