On Sat, Jan 20 2018, Stuart Henderson <s...@spacehopper.org> wrote: [...]
> How about making the cmake debug-build stuff dependent on a > flavour (like "CMAKE_DEBUG") rather than making DEBUG do > double-duty as a compiler flag option *and* a cmake knob? > > (We already removed some other cases where DEBUG turned on > port-specific debug options..) Looks like several people agree with this direction, so here's a diff that adds MODCMAKE_DEBUG. Comments/oks? Index: share/man/man5/port-modules.5 =================================================================== RCS file: /d/cvs/src/share/man/man5/port-modules.5,v retrieving revision 1.225 diff -u -p -r1.225 port-modules.5 --- share/man/man5/port-modules.5 2 Dec 2017 09:31:52 -0000 1.225 +++ share/man/man5/port-modules.5 21 Jan 2018 16:58:03 -0000 @@ -569,6 +569,13 @@ If set to `Yes', CMake will print detail stages about exact command being run, etc. Should not be used in ports Makefiles. Default value is `Yes'. +.It MODCMAKE_DEBUG +If set to `Yes', CMake will produce a debug build instead of a release +build. +The exact effects on the build process depend on settings specified in +the CMake config files. +Also files in the resulting package might named differently. +Default value is `No'. .El Also, .Sq nojunk Index: devel/cmake/cmake.port.mk =================================================================== RCS file: /d/cvs/ports/devel/cmake/cmake.port.mk,v retrieving revision 1.62 diff -u -p -r1.62 cmake.port.mk --- devel/cmake/cmake.port.mk 28 Nov 2017 10:26:00 -0000 1.62 +++ devel/cmake/cmake.port.mk 21 Jan 2018 16:51:31 -0000 @@ -65,6 +65,8 @@ CONFIGURE_ENV += MODJAVA_VER=${MODJAVA_V MODTCL_LIB=${MODTCL_LIB} \ MODTK_LIB=${MODTK_LIB} +MODCMAKE_DEBUG ?= No + .if empty(CONFIGURE_STYLE) CONFIGURE_STYLE= cmake .endif @@ -76,7 +78,7 @@ MODCMAKE_configure= cd ${WRKBUILD} && ${ -G ${_MODCMAKE_GEN} ${CONFIGURE_ARGS} ${WRKSRC} .if !defined(CONFIGURE_ARGS) || ! ${CONFIGURE_ARGS:M*CMAKE_BUILD_TYPE*} -. if defined(DEBUG) +. if ${MODCMAKE_DEBUG:L} == "yes" CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE:String=Debug MODCMAKE_BUILD_SUFFIX = -debug.cmake . else -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE