From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Sep 7 20:10:07 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A67310656EB for ; Tue, 7 Sep 2010 20:10:07 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EE5FD8FC19 for ; Tue, 7 Sep 2010 20:10:06 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o87KA6R5096825 for ; Tue, 7 Sep 2010 20:10:06 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o87KA6TL096824; Tue, 7 Sep 2010 20:10:06 GMT (envelope-from gnats) Resent-Date: Tue, 7 Sep 2010 20:10:06 GMT Resent-Message-Id: <201009072010.o87KA6TL096824@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitry Marakasov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3DF6A10656B1 for ; Tue, 7 Sep 2010 20:07:24 +0000 (UTC) (envelope-from amdmi3@amdmi3.ru) Received: from smtp.timeweb.ru (smtp.timeweb.ru [92.53.116.15]) by mx1.freebsd.org (Postfix) with ESMTP id EF8738FC0A for ; Tue, 7 Sep 2010 20:07:23 +0000 (UTC) Received: from [213.148.20.85] (helo=hive.panopticon) by smtp.timeweb.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.71) (envelope-from ) id 1Ot4Rt-0002s5-IJ for FreeBSD-gnats-submit@freebsd.org; Wed, 08 Sep 2010 00:07:21 +0400 Received: from hades.panopticon (hades.panopticon [192.168.0.32]) by hive.panopticon (Postfix) with ESMTP id 366FCB84D for ; Wed, 8 Sep 2010 00:07:20 +0400 (MSD) Received: by hades.panopticon (Postfix, from userid 1000) id 12FBFB84E; Wed, 8 Sep 2010 00:07:20 +0400 (MSD) Message-Id: <20100907200720.12FBFB84E@hades.panopticon> Date: Wed, 8 Sep 2010 00:07:20 +0400 (MSD) From: Dmitry Marakasov To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/150363: [bsd.cmake.mk] specify default CMAKE_BUILD_TYPE X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dmitry Marakasov List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2010 20:10:07 -0000 >Number: 150363 >Category: ports >Synopsis: [bsd.cmake.mk] specify default CMAKE_BUILD_TYPE >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Sep 07 20:10:06 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Dmitry Marakasov >Release: FreeBSD 8.1-RELEASE i386 >Organization: >Environment: System: FreeBSD hades.panopticon 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Fri Jul 30 02:50:28 MSD 2010 root@hades.panopticon:/async/obj/usr/src/sys/HADES i386 >Description: CMake has many means to affect compilation flags. We use CMAKE_C_FLAGS/CMAKE_CXX_FLAGS to pass our systemwide flags to cmake, however there's CMAKE_BUILD_TYPE knob which allows you to just select typical configuration (debug/release/release with debug info/etc.) with a single setting. We don't use CMAKE_BUILD_TYPE, however many applications change it in their CMakeLists.txt if it is not defined, thus unwanted debugging or optimization flags get into compiler args. That can be fixed by patching upstream CMakeLists, however I propose a better way - we define our owu build type for which cmake doesn't have default flags. Thus, - nothing extra to CFLAGS/CXXFLAGS will be passed to compiler - no patches to upstream CMakeLists.txt will be needed Build type I've chosen is arguable - just took something similar to CONFIGURE_TARGET. This probably needs an exp-run, as it may affect software that change CMAKE_BUILD_TYPE itself, but that isn't fixed in the port >How-To-Repeat: >Fix: --- bsd.cmake.mk.patch begins here --- Index: bsd.cmake.mk =================================================================== RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/Mk/bsd.cmake.mk,v retrieving revision 1.8 diff -u -r1.8 bsd.cmake.mk --- bsd.cmake.mk 31 Mar 2010 18:07:05 -0000 1.8 +++ bsd.cmake.mk 7 Sep 2010 19:58:53 -0000 @@ -12,7 +12,7 @@ # Default: not set # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types), # affects on CFLAGS and thus should not be set. -# Default: none (which respects CFLAGS) +# Default: FreeBSD_portbld (which respects CFLAGS) # CMAKE_VERBOSE - Verbose build # Default: not set # CMAKE_OUTSOURCE - Instruct to perform an out-of-source build @@ -63,7 +63,7 @@ INSTALL_WRKSRC= ${CONFIGURE_WRKSRC} .endif CMAKE_INSTALL_PREFIX?= ${PREFIX} -CMAKE_BUILD_TYPE?= #none +CMAKE_BUILD_TYPE?= FreeBSD_portbld # # Instruct cmake to compile/link with pthreads --- bsd.cmake.mk.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: