Ignore:
Timestamp:
Nov 2, 2013, 5:15:57 PM (6 years ago)
Author:
jeremyhu@…
Message:

Consider the configure.cflags and configure.cxxflags for +debug variant of the CMake PortsGroup (#40648).

The CMAKE_BUILD_TYPE "Debug" uses CMAKE_C_FLAGS_DEBUG and CMAKE_CXX_FLAGS_DEBUG to specify the
compiler flags. These variables are set to "-g" plus the respective configure.cflags and
configure.cxxflags. Be aware that configure.cflags and configure.cxxflags contain
configure.optflags by default, which are not deleted for the Debug build. The port author has to
set configure.optflags to "-O0" to turn off optimization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/_resources/port1.0/group/cmake-1.0.tcl

    r112837 r112838  
    139139    configure.args-delete   -DCMAKE_BUILD_TYPE=Release
    140140    configure.args-append   -DCMAKE_BUILD_TYPE=Debug
     141    # Consider the configure.cflags and configure.cxxflags for Debug builds.
     142    # Attention, they contain configure.optflags by default!
     143    if {${configure.cflags} != ""} {
     144        configure.args-append -DCMAKE_C_FLAGS_DEBUG="-g ${configure.cflags}"
     145    }
     146    if {${configure.cxxflags} != ""} {
     147        configure.args-append -DCMAKE_CXX_FLAGS_DEBUG="-g ${configure.cxxflags}"
     148    }
    141149}
    142150
Note: See TracChangeset for help on using the changeset viewer.