Define per-target OSX_ARCHITECTURES property

The CMAKE_OSX_ARCHITECTURES variable works only as a global setting.
This commit defines target properties

  OSX_ARCHITECTURES
  OSX_ARCHITECTURES_<CONFIG>

to specify OS X architectures on a per-target and per-configuration
basis.  See issue #8725.
This commit is contained in:
Brad King
2009-10-21 13:00:49 -04:00
parent 2f94a2c919
commit 2dc39b8c32
8 changed files with 112 additions and 25 deletions

View File

@@ -229,6 +229,10 @@ void cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
// Add language feature flags.
this->AddFeatureFlags(flags, linkLanguage);
#ifdef __APPLE__
this->LocalGenerator->AddArchitectureFlags(flags, this->Target, linkLanguage, this->ConfigName);
#endif /* __APPLE__ */
// Add target-specific linker flags.
this->LocalGenerator->AppendFlags
(linkFlags, this->Target->GetProperty("LINK_FLAGS"));