Thursday, November 02, 2017

Re: add relwithdebinfo support to cmake.port.mk ?

On 2017/11/02 11:01, Landry Breuil wrote:
> Hi,
>
> i needed this for qgis which is a huge behemoth, and i dont want to
> build it with fullblown debug... so is there any interest in the
> following diff, or the way to specify (ie use
> MODCMAKE_BUILD_TYPE=RelWithDebInfo in consumer Makefile) it looks wrong ?

How about this?

Index: cmake.port.mk
===================================================================
RCS file: /cvs/ports/devel/cmake/cmake.port.mk,v
retrieving revision 1.58
diff -u -p -r1.58 cmake.port.mk
--- cmake.port.mk 29 Apr 2016 10:34:33 -0000 1.58
+++ cmake.port.mk 2 Nov 2017 10:25:44 -0000
@@ -75,12 +75,14 @@ MODCMAKE_configure= cd ${WRKBUILD} && ${
-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY:Bool=True \
-G ${_MODCMAKE_GEN} ${CONFIGURE_ARGS} ${WRKSRC}

-.if defined(DEBUG)
+.if ! ${CONFIGURE_ARGS:M*CMAKE_BUILD_TYPE*}
+. if defined(DEBUG)
CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE:String=Debug
MODCMAKE_BUILD_SUFFIX = -debug.cmake
-.else
+. else
CONFIGURE_ARGS += -DCMAKE_BUILD_TYPE:String=Release
MODCMAKE_BUILD_SUFFIX = -release.cmake
+. endif
.endif
SUBST_VARS += MODCMAKE_BUILD_SUFFIX

No comments:

Post a Comment