[MacPorts] #49108: CMake Portgroup: use a custom CMAKE_BUILD_TYPE
MacPorts
noreply at macports.org
Mon Oct 5 04:47:04 PDT 2015
#49108: CMake Portgroup: use a custom CMAKE_BUILD_TYPE
-------------------------+--------------------------------
Reporter: rjvbertin@… | Owner: macports-tickets@…
Type: enhancement | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Keywords: haspatch | Port:
-------------------------+--------------------------------
I cannot speak for earlier versions, but since v2.8.x cmake has been
(increasingly?) strict about the compiler and linker flags used with the 4
builtin build types (Release, RelWithDebInfo etc). There is undoubtedly a
good reason for that, but it does seem to clash with MacPorts' own
conventions because it makes it about impossible to control exactly what
options are used.
Debian and Ubuntu circumvent this by using `-DCMAKE_BUILD_TYPE=Debian`.
There is no patch (to my knowledge) that adds this preset to cmake; it
simply causes cmake to use `CMAKE_CXX_FLAGS` and family instead of
`CMAKE_CXX_FLAGS_RELEASE` (or `*_RELWITHDEBINFO` etc). In addition, flags
passed through the `CXXFLAGS` etc. env. variables end up in
`CMAKE_CXX_FLAGS` and family.
I propose to follow the same approach in MacPorts, so that the usual
mechanisms for setting compiler and linker options work completely as
expected.
--
Ticket URL: <https://trac.macports.org/ticket/49108>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list