[MacPorts] #40648: cmake @2.8.11.2 does not set optimization flags in release

MacPorts noreply at macports.org
Mon Nov 4 02:52:25 PST 2013


#40648: cmake @2.8.11.2 does not set optimization flags in release
-------------------------+--------------------
  Reporter:  macports@…  |      Owner:  css@…
      Type:  defect      |     Status:  closed
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:  fixed       |   Keywords:
      Port:  cmake       |
-------------------------+--------------------

Comment (by Torsten.Maehne@…):

 Unfortunately, the modification to the CMake PortGroup proposed by this
 ticket have broken other ports using CMake to configure its sources for
 the build phase.

 Unfortunately, the CMake man pages and
 <http://www.cmake.org/cmake/help/v2.8.12/cmake.html> do not mention at
 all that the environment variables CFLAGS, CXXFLAGS, and LDFLAGS get
 honored by CMake upon its first call in a new build directory. The
 book "Mastering CMake" (4th edition) by Ken Martin and Bill Hoffmann
 mentions it only briefly in Section 2.7 "Specifying the Compiler to
 CMake" and the end of Appendix A -- but you have to know what you're
 looking for.

 Therefore, the previously proposed modification of the CMake PortGroup
 to honor configure.optflags and configure.cppflags can be simplified as
 other language-specific
 flags were already forwarded correctly to CMake via the above
 environment variables.

 This should also fix the observed compilation problems of other ports
 using CMake to configure their sources for the build phase.

 Could you please try out the {{{patch-cmake-portgroup.diff}}}?

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


More information about the macports-tickets mailing list