View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014161CMakeCMakepublic2013-05-22 08:442013-10-07 10:09
ReporterMatthew Bentham 
Assigned ToBrad King 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformApple MacOSOS XOS Version10.4.10
Product VersionCMake 2.8.11 
Target VersionCMake 2.8.12Fixed in VersionCMake 2.8.12 
Summary0014161: Xcode generator ignores CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG>
DescriptionWhen generating using Xcode, the following variables have no effect:

CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_RELEASE

The _<CONFIG> variants of CMAKE_EXE_LINKER_FLAGS work correctly, as do the base variables CMAKE_MODULE_LINKER_FLAGS and CMAKE_SHARED_LINKER_FLAGS.
Additional InformationSuggested patch:

Index: Source/cmGlobalXCodeGenerator.cxx
===================================================================
--- Source/cmGlobalXCodeGenerator.cxx (revision 47381)
+++ Source/cmGlobalXCodeGenerator.cxx (working copy)
@@ -1714,30 +1714,26 @@
   buildSettings->AddAttribute
     ("GCC_PREPROCESSOR_DEFINITIONS", ppDefs.CreateList());
 
+ std::string extraLinkOptionsVar;
   std::string extraLinkOptions;
   if(target.GetType() == cmTarget::EXECUTABLE)
     {
- extraLinkOptions =
- this->CurrentMakefile->GetRequiredDefinition("CMAKE_EXE_LINKER_FLAGS");
- std::string var = "CMAKE_EXE_LINKER_FLAGS_";
- var += cmSystemTools::UpperCase(configName);
- std::string val =
- this->CurrentMakefile->GetSafeDefinition(var.c_str());
- if(val.size())
- {
- extraLinkOptions += " ";
- extraLinkOptions += val;
- }
+ extraLinkOptionsVar = "CMAKE_EXE_LINKER_FLAGS";
     }
- if(target.GetType() == cmTarget::SHARED_LIBRARY)
+ else if(target.GetType() == cmTarget::SHARED_LIBRARY)
     {
- extraLinkOptions = this->CurrentMakefile->
- GetRequiredDefinition("CMAKE_SHARED_LINKER_FLAGS");
+ extraLinkOptionsVar = "CMAKE_SHARED_LINKER_FLAGS";
     }
- if(target.GetType() == cmTarget::MODULE_LIBRARY)
+ else if(target.GetType() == cmTarget::MODULE_LIBRARY)
     {
- extraLinkOptions = this->CurrentMakefile->
- GetRequiredDefinition("CMAKE_MODULE_LINKER_FLAGS");
+ extraLinkOptionsVar = "CMAKE_MODULE_LINKER_FLAGS";
+ }
+
+ if (extraLinkOptionsVar.size())
+ {
+ this->CurrentLocalGenerator->AddConfigVariableFlags(extraLinkOptions,
+ extraLinkOptionsVar.c_str(),
+ configName);
     }
 
   const char* linkFlagsProp = "LINK_FLAGS";
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0033111)
Brad King (manager)
2013-05-22 13:10

Patch applied, thanks!

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bcda47d2 [^]
(0034054)
Robert Maynard (manager)
2013-10-07 10:09

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2013-05-22 08:44 Matthew Bentham New Issue
2013-05-22 11:46 Brad King Assigned To => Brad King
2013-05-22 11:46 Brad King Status new => assigned
2013-05-22 11:46 Brad King Target Version => CMake 2.8.12
2013-05-22 13:10 Brad King Note Added: 0033111
2013-05-22 13:10 Brad King Status assigned => resolved
2013-05-22 13:10 Brad King Resolution open => fixed
2013-05-22 13:10 Brad King Fixed in Version => CMake 2.8.12
2013-10-07 10:09 Robert Maynard Note Added: 0034054
2013-10-07 10:09 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team