View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015427CMakeCMakepublic2015-02-28 12:552016-06-10 14:31
ReporterClinton Stimpson 
Assigned ToKitware Robot 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionmoved 
PlatformOSOS XOS Version10.9
Product VersionCMake 3.2 
Target VersionFixed in Version 
Summary0015427: Xcode generation omits CXX flags for linking
DescriptionIf I set CXXFLAGS (env var) or CMAKE_CXX_FLAGS, the resulting Xcode project does not contain those flags when linking C++ binaries, but a resulting Makefile does.

This can result in link errors when building with Xcode which one does not see when building with Makefiles.
Steps To ReproduceUsing the attached project, build using Makefiles and it works fine.
Build with Xcode and one gets link errors about unresolved symbols from the standard c++ library.

Notice how the -stdlib=libstdc++ flag is missing from the link command under Xcode.
TagsNo tags attached.
Attached Filestar file icon test-stdlib.tar [^] (3,584 bytes) 2015-02-28 12:55

 Relationships

  Notes
(0038136)
Sean McBride (reporter)
2015-03-02 12:39

The inconsistency is bad for sure, but there are complier flags that the linker does not support. If compiler flags always get passed to the linker, that could be a problem...
(0038137)
Brad King (manager)
2015-03-02 14:11

Re 0015427:0038136: We're talking about passing CMAKE_<LANG>_FLAGS to the <LANG> compiler front-end when using it to drive the linker. The front-end knows which options affect how it invokes the linker. This is already done for other generators and is simply missing for Xcode, according to this report.
(0042723)
Kitware Robot (administrator)
2016-06-10 14:29

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2015-02-28 12:55 Clinton Stimpson New Issue
2015-02-28 12:55 Clinton Stimpson File Added: test-stdlib.tar
2015-03-02 12:39 Sean McBride Note Added: 0038136
2015-03-02 14:11 Brad King Note Added: 0038137
2016-06-10 14:29 Kitware Robot Note Added: 0042723
2016-06-10 14:29 Kitware Robot Status new => resolved
2016-06-10 14:29 Kitware Robot Resolution open => moved
2016-06-10 14:29 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team