| View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||
| 0014161 | CMake | CMake | public | 2013-05-22 08:44 | 2013-10-07 10:09 | ||||
| Reporter | Matthew Bentham | ||||||||
| Assigned To | Brad King | ||||||||
| Priority | normal | Severity | minor | Reproducibility | always | ||||
| Status | closed | Resolution | fixed | ||||||
| Platform | Apple Mac | OS | OS X | OS Version | 10.4.10 | ||||
| Product Version | CMake 2.8.11 | ||||||||
| Target Version | CMake 2.8.12 | Fixed in Version | CMake 2.8.12 | ||||||
| Summary | 0014161: Xcode generator ignores CMAKE_(MODULE|SHARED)_LINKER_FLAGS_<CONFIG> | ||||||||
| Description | When 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 Information | Suggested 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"; | ||||||||
| Tags | No tags attached. | ||||||||
| Attached Files | |||||||||
| Relationships | |
| 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. |
| Notes |
| 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 |
| Issue History |
| Copyright © 2000 - 2018 MantisBT Team |