[MacPorts] #41256: cmake portgroup's debug variant sets release optflags
#41256: cmake portgroup's debug variant sets release optflags -----------------------+-------------------------------- Reporter: florian@… | Owner: macports-tickets@… Type: request | Status: new Priority: Normal | Milestone: Component: ports | Version: Keywords: | Port: -----------------------+-------------------------------- This is a follow up of #41142 and #40648. CMake's debug flags do not include optimization at all. With the cmake portgroup we get -Os. But debug symbols with optimization are not helpful (see comment:4:ticket:41203). The other point is that CMake's default release flags are -O3 -DNDEBUG and not -Os -DNDEBUG. AFAIK, -Os equals -O2 plus extra code size reduction. So anyone relying on CMake's default will get less optimized builds. A Portfile workaround would be: {{{ if {[variant_isset debug]} { configure.optflags -O0 } else { configure.optflags -O3 } }}} I suggest at least modifying cmake-1.0.tcl as such: {{{ variant debug description "Enable debug binaries" { configure.args-delete -DCMAKE_BUILD_TYPE=Release configure.args-append -DCMAKE_BUILD_TYPE=Debug configure.optflags -O0 } }}} to correct the debug optflags. -- Ticket URL: <https://trac.macports.org/ticket/41256> MacPorts <http://www.macports.org/> Ports system for OS X
#41256: cmake portgroup's debug variant sets release optflags --------------------------+-------------------------------- Reporter: florian@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: | --------------------------+-------------------------------- Changes (by macsforever2000@…): * type: request => enhancement -- Ticket URL: <https://trac.macports.org/ticket/41256#comment:1> MacPorts <http://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts