From nobody Sat May 03 07:08:05 2025 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZqJlp0T2Sz5tqt3; Sat, 03 May 2025 07:08:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZqJln6tQKz412V; Sat, 03 May 2025 07:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746256086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jS/y3zE7hMexjYiidTglWQKZLevpuj8/6uKZtyi4XNI=; b=OUXUAp+xNQO9HPGWCfkQhrQgEzpjZ97lGzNgHuzTqCLsAzNY5cGv47AXAOBQhci76zvOZF 7uQe3qgkq9FkJYRzzjlAbumqfqdEcNWgSJd8eV/a2lHrxGY6UcncQtRW7ME/R7NI06l7ZP 3VTsCG2RGK/xC8EBZ/ua4SMigFiTNqSx3Pc4BqMGAEr3GswH6N0Vbq+wXbNwnm/IXlW0Rz FrTtINfcckEVBVmVsPx3RFGnoFoKtWk8JEpBMBH2KYZg/HTXXVnRAiIh6ZsilrvwBcCklt 0TAKmjR3lWTWVz0/0/c1+1k+xRxK8znz8IPTyco3M3oDQ24aLZFmVPu4zR0yZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1746256086; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jS/y3zE7hMexjYiidTglWQKZLevpuj8/6uKZtyi4XNI=; b=ElYXS2d7LB/Y62Ely72pAzqK0i1IoPA2J0OoJIMbkF+AM4IOWmOfNY8XXCZhIG3WsNl7pJ VEF/TI7bk89UZHQxJX0ACo+kibrxN8kuO64dpxSlcHDE2+cjXcz6ea3o2BlYgjvL84LdXf G+sEvcXHjImW2VPUYNxyMS+JaNl34qA6geSoyuisxpIl7c7I/alpLKdgLw2QXMIqBCjWF8 k+/h3x5jbAV+G9yPcE4+bhv3+CEB7PpYS26fQjewBlDN9EnA1wiWPoS71Z5k1SnLsZkMlW foy5RHUGIjkY2PyBtKxKV43wWcB0AHAdbKm1hCrp0UjgpsKnUtIHuzM87tLwtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1746256086; a=rsa-sha256; cv=none; b=M0rUx6kdQipL3pAiWSXtUWXCQK/gLhjCcl0L58G7f3nqO2WpmaTWDyrBUQQQREhprwGOI3 d46V5gLP5PLIgP44N0UVJCd6wwZGkxBH/wwk1NjkR0uPrfeDhVbdFDlBpJISGAS/CcbsFD USNNchmZmzb9mNdo6X+MMse4QkIkU2NW8bTtOrwTiUTPQ6wvx6yPNWzkzWdMWVFhWX104k osDmZR/w+fBLqsTRPt2lkvVBwl8W/CIYJGXKoYstaACbklpm1u7rxBAoJMbR0UbYlcSgHY Vmgz9mu2WGkdBy6jmM/Z+N4BjV0iv/GOXgx7pa56+a5PrPP3st6bcO5oEDmt1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4ZqJln6QYDzYkS; Sat, 03 May 2025 07:08:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 543785eU023482; Sat, 3 May 2025 07:08:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54378560023479; Sat, 3 May 2025 07:08:05 GMT (envelope-from git) Date: Sat, 3 May 2025 07:08:05 GMT Message-Id: <202505030708.54378560023479@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: c7532c276101 - main - devel/cmake-core: Respect user CFLAGS/CXXFLAGS List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7532c276101c3ad3f9428b45c9d4b13c6cff395 Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=c7532c276101c3ad3f9428b45c9d4b13c6cff395 commit c7532c276101c3ad3f9428b45c9d4b13c6cff395 Author: Jason E. Hale AuthorDate: 2025-05-03 05:29:38 +0000 Commit: Jason E. Hale CommitDate: 2025-05-03 07:07:57 +0000 devel/cmake-core: Respect user CFLAGS/CXXFLAGS CMake has set a few compiler optimization flags for ages, depending upon the build type. For Debug and Release build types, especially, these flags are overridden in Mk/Uses/cmake.mk for projects that use CMake, including other CMake components, i.e., devel/cmake-(doc|gui|man), but not cmake-core, since it has to bootstrap itself. This change makes the core component build with the same flags as the rest of the cmake ports. For most users, this just means that cmake-core will now build with -O2 instead of -O3 by default. Not bumping PORTREVISION since nobody has really cared about this for the past 15 years. To be clear, all other CFLAGS/CXXFLAGS have been respected. This just elimitates the -O3 flag that CMake internally adds for Release builds of cmake-core. Based upon work by former FreeBSD committer koobs. [1] [1] https://github.com/koobs/ports/commit/da342cfb3dd94f005e4a44d2ef9c863fc19b58e2 [1] Co-authored-by: Daniel Engberg PR: 286494 --- devel/cmake-core/files/InitialCache.cmake.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/devel/cmake-core/files/InitialCache.cmake.in b/devel/cmake-core/files/InitialCache.cmake.in index 15977658349d..8e251e632a23 100644 --- a/devel/cmake-core/files/InitialCache.cmake.in +++ b/devel/cmake-core/files/InitialCache.cmake.in @@ -13,3 +13,14 @@ set(LibArchive_INCLUDE_DIR "/usr/include" CACHE PATH "Directory where LibArchive headers are located.") set(LibArchive_LIBRARY "/usr/lib/libarchive.so" CACHE PATH "LibArchive library to link against.") + +# Respect user CFLAGS/CXXFLAGS for DEBUG and RELEASE builds as in +# Mk/Uses/cmake.mk. +set(CMAKE_C_FLAGS_DEBUG "" CACHE STRING + "Flags used by the C compiler during DEBUG builds.") +set(CMAKE_C_FLAGS_RELEASE "-DNDEBUG" CACHE STRING + "Flags used by the C compiler during RELEASE builds.") +set(CMAKE_CXX_FLAGS_DEBUG "" CACHE STRING + "Flags used by the CXX compiler during DEBUG builds.") +set(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG" CACHE STRING + "Flags used by the CXX compiler during RELEASE builds.")