BUG: Fix Xcode linker language

Xcode does not seem to support direct requests for using the linker for
a particular language.  It always infers the linker using the languages
in the source files.  When no user source files compile with target's
linker language we add one to help Xcode pick the linker.

A typical use case is when a C executable links to a C++ archive.  The
executable has no C++ source files but we need to use the C++ linker.
This commit is contained in:
Brad King
2009-07-10 16:51:44 -04:00
parent bb2228ea1a
commit a232dbe8d2
3 changed files with 62 additions and 3 deletions

View File

@@ -128,6 +128,8 @@ private:
cmXCodeObject* CreateObjectReference(cmXCodeObject*);
cmXCodeObject* CreateXCodeTarget(cmTarget& target,
cmXCodeObject* buildPhases);
void ForceLinkerLanguages();
void ForceLinkerLanguage(cmTarget& cmtarget);
const char* GetTargetFileType(cmTarget& cmtarget);
const char* GetTargetProductType(cmTarget& cmtarget);
std::string AddConfigurations(cmXCodeObject* target, cmTarget& cmtarget);