MantisBT - CMake
View Issue Details
0014526CMakeCMakepublic2013-10-31 03:202016-06-10 14:31
David Rogers 
Gregor Jasny 
normalminoralways
closedmoved 
AppleOS X10.9
CMake 2.8.12 
 
0014526: Xcode generator sets incorrect release optimization flag
Xcode projects generated have -O0 set for the release configuration. I think it used to be -O3 but I could be wrong on that. -O0 is certainly incorrect though.
Create any CMake project, I used the one here: http://www.cmake.org/cmake/help/cmake_tutorial.html [^]

Create an Xcode project from it by running cmake -G Xcode .

Open the project, look at the incorrect Release configuration optimization flag.
I do not know if 2.8.12 is the first version that is affected by this bug. I have not tried 2.8.11 to double check.
No tags attached.
Issue History
2013-10-31 03:20David RogersNew Issue
2014-03-24 08:43Jan RüeggNote Added: 0035481
2015-12-30 08:38Gregor JasnyNote Added: 0040031
2015-12-30 08:38Gregor JasnyAssigned To => Gregor Jasny
2015-12-30 08:38Gregor JasnyStatusnew => assigned
2016-06-10 14:29Kitware RobotNote Added: 0042407
2016-06-10 14:29Kitware RobotStatusassigned => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0035481)
Jan Rüegg   
2014-03-24 08:43   
I can confirm this, also adding it to the cxx configuration variable doesn't help. Always set to -O0
(0040031)
Gregor Jasny   
2015-12-30 08:38   
with latest master cmake I get the following:

$ xcodebuild -showBuildSettings -target foo -configuration Release |grep OPTI 
    GCC_OPTIMIZATION_LEVEL = 3
    OPTIMIZATION_LEVEL = 0


Xcode itself shows "fastest" for optimization level, so I guess with Xcode 7 the GCC_ variant is used.
Does this bug still occur to you? If yes what Xcode and CMake version do you use?
(0042407)
Kitware Robot   
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.