[MacPorts] #40711: cmake @2.8.11.2 - downstream software loses -O3 flag

MacPorts noreply at macports.org
Wed Oct 9 08:32:18 PDT 2013


#40711: cmake @2.8.11.2 - downstream software loses -O3 flag
-------------------------+--------------------------------
 Reporter:  johnsonsr@…  |      Owner:  macports-tickets@…
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.2.0
 Keywords:               |       Port:  cmake
-------------------------+--------------------------------
 Any program newly compiled with the macports CMake '''will no longer use
 the -O3 flag''' when compiled as a "Release" code.  This does not apply
 just to downstream macports installations but also to the user's custom
 installations that use the MacPorts-installed cmake.

 Basically, the CMake variable "CMAKE_CXX_FLAGS_RELEASE" is normally set to
 "-O3 -DNDEBUG" but an overzealous patch in the macports scripts changes
 this to " -DNDEBUG".

 Due to a change in revision 110069:
 {{{
 eval reinplace "s|-O3||g" [glob
 ${worksrcpath}/Modules/{Compiler,Platform}/*.cmake]
 }}}
 the CMake flag variables are changed from
 {{{
 ./Modules/Compiler/GNU.cmake:47:  set(CMAKE_${lang}_FLAGS_RELEASE_INIT
 "-O3 -DNDEBUG")
 }}}
 to
 {{{
 ./Modules/Compiler/GNU.cmake:47:  set(CMAKE_${lang}_FLAGS_RELEASE_INIT "
 -DNDEBUG")
 }}}

 This has affected some of our scientific software that we benchmark
 regularly: the "Release" flag is no longer turning on optimization like it
 does for a standard CMake installation. This is a very subtle bug that
 must be fixed ASAP.

-- 
Ticket URL: <https://trac.macports.org/ticket/40711>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list