From owner-svn-ports-all@freebsd.org Sun Dec 31 09:43:06 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D342FEAD545; Sun, 31 Dec 2017 09:43:06 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9C1AD6BEDA; Sun, 31 Dec 2017 09:43:06 +0000 (UTC) (envelope-from tcberner@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBV9h5Gw055341; Sun, 31 Dec 2017 09:43:05 GMT (envelope-from tcberner@FreeBSD.org) Received: (from tcberner@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBV9h5AH055339; Sun, 31 Dec 2017 09:43:05 GMT (envelope-from tcberner@FreeBSD.org) Message-Id: <201712310943.vBV9h5AH055339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tcberner set sender to tcberner@FreeBSD.org using -f From: "Tobias C. Berner" Date: Sun, 31 Dec 2017 09:43:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457677 - in head: . Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: tcberner X-SVN-Commit-Paths: in head: . Mk/Uses X-SVN-Commit-Revision: 457677 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Dec 2017 09:43:06 -0000 Author: tcberner Date: Sun Dec 31 09:43:05 2017 New Revision: 457677 URL: https://svnweb.freebsd.org/changeset/ports/457677 Log: Add CMAKE_ON and CMAKE_OFF to cmake.mk USES=cmake now supports two additional list variables: * CMAKE_ON : List of variables to turn on * CMAKE_OFF : List of variables to turn off This can be used as a shortcut to append these to CMAKE_ARGS. For example ports that previously set CMAKE_ARGS= -DVAR1:BOOL=TRUE -DVAR2:BOOL=TRUE -DVAR3:BOOL=FALSE can now set this as CMAKE_ON= VAR1 VAR2 CMAKE_OFF= VAR3 Reviewed by: adridg, rakuco, mat Differential Revision: https://reviews.freebsd.org/D13636 Modified: head/CHANGES head/Mk/Uses/cmake.mk Modified: head/CHANGES ============================================================================== --- head/CHANGES Sun Dec 31 09:23:27 2017 (r457676) +++ head/CHANGES Sun Dec 31 09:43:05 2017 (r457677) @@ -10,6 +10,20 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20171231: +AUTHOR: kde@FreeBSD.org + + USES=cmake now supports two additional list variables: + * CMAKE_ON : List of variables to turn on + * CMAKE_OFF : List of variables to turn off + This can be used as a shortcut to append these to CMAKE_ARGS. + + For example ports that previously set + CMAKE_ARGS= -DVAR1:BOOL=TRUE -DVAR2:BOOL=TRUE -DVAR3:BOOL=FALSE + can now set this as + CMAKE_ON= VAR1 VAR2 + CMAKE_OFF= VAR3 + 20171130: AUTHOR: mat@FreeBSD.org Modified: head/Mk/Uses/cmake.mk ============================================================================== --- head/Mk/Uses/cmake.mk Sun Dec 31 09:23:27 2017 (r457676) +++ head/Mk/Uses/cmake.mk Sun Dec 31 09:43:05 2017 (r457677) @@ -25,6 +25,8 @@ # Default: not set, unless BATCH or PACKAGE_BUILDING is defined # # Variables for ports: +# CMAKE_ON Appends -D:bool=ON to the CMAKE_ARGS, +# CMAKE_OFF Appends -D:bool=OFF to the CMAKE_ARGS. # CMAKE_ARGS - Arguments passed to cmake # Default: see below # CMAKE_BUILD_TYPE - Type of build (cmake predefined build types). @@ -88,6 +90,13 @@ CMAKE_ARGS+= -DCMAKE_C_COMPILER:STRING="${CC}" \ -DTHREADS_HAVE_PTHREAD_ARG:BOOL=YES \ -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=YES \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON + +# Handle the option-like CMAKE_ON and CMAKE_OFF lists. +.for _bool_kind in ON OFF +. if defined(CMAKE_${_bool_kind}) +CMAKE_ARGS+= ${CMAKE_${_bool_kind}:C/.*/-D&:BOOL=${_bool_kind}/} +. endif +.endfor CMAKE_INSTALL_PREFIX?= ${PREFIX}