Date: Wed, 13 Aug 2008 19:42:34 +0400 (MSD) From: Dmitry Marakasov <amdmi3@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/126507: [PATCH] bsd.cmake.mk: set CMAKE_BUILD_TYPE to "" Message-ID: <20080813154234.B85A51702D@hades.panopticon> Resent-Message-ID: <200808131550.m7DFo1eZ098248@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 126507 >Category: ports >Synopsis: [PATCH] bsd.cmake.mk: set CMAKE_BUILD_TYPE to "" >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Aug 13 15:50:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 7.0-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD hades.panopticon 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #1: Wed Jun 25 15:36:22 MSD 2008 root@hades.panopticon:/usr/obj/usr/src/sys/HADES i386 >Description: CMake has several build types, and (I think that appeared in 2.6.1) adds stuff to {C,CXX}FLAGS depending on buildtype. >From /usr/local/share/cmake/Modules/Platform/gcc.cmake: SET (CMAKE_C_FLAGS_INIT "") SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-Os -DNDEBUG") SET (CMAKE_C_FLAGS_RELEASE_INIT "-O3 -DNDEBUG") SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g") Currently, buildtype is set to Release, so `-O3 -DNDEBUG' is unconditionally added to cflags, which is, of course, very bad. Thus, hardcode CMAKE_BUILD_TYPE to "", so cmake doesn't ever tamper with cflags set by the ports system. >How-To-Repeat: >Fix: --- bsd.cmake.mk.patch begins here --- Index: bsd.cmake.mk =================================================================== RCS file: /home/pcvs/ports/Mk/bsd.cmake.mk,v retrieving revision 1.2 diff -u -r1.2 bsd.cmake.mk --- bsd.cmake.mk 10 Aug 2008 15:43:46 -0000 1.2 +++ bsd.cmake.mk 13 Aug 2008 15:35:02 -0000 @@ -47,12 +47,11 @@ -DCMAKE_C_FLAGS:STRING="${CFLAGS}" \ -DCMAKE_CXX_FLAGS:STRING="${CXXFLAGS}" \ -DCMAKE_INSTALL_PREFIX:PATH="${CMAKE_INSTALL_PREFIX}" \ - -DCMAKE_BUILD_TYPE:STRING="${CMAKE_BUILD_TYPE}" + -DCMAKE_BUILD_TYPE:STRING="" # # Default build type and sourcedir # -CMAKE_BUILD_TYPE?= Release CMAKE_SOURCE_PATH?= . CMAKE_INSTALL_PREFIX?= ${PREFIX} --- bsd.cmake.mk.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080813154234.B85A51702D>