From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YOoREjqcBmcEGwAAqHPOHw:P1 (envelope-from ) for ; Wed, 09 Oct 2024 15:07:38 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YOoREjqcBmcEGwAAqHPOHw (envelope-from ) for ; Wed, 09 Oct 2024 17:07:38 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HDu804Zs; dkim=fail ("headers rsa verify failed") header.d=greghogan-com.20230601.gappssmtp.com header.s=20230601 header.b=LvDmlxIl; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 006AAEAC for ; Wed, 09 Oct 2024 17:07:32 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syYH9-0008TE-K8; Wed, 09 Oct 2024 11:06:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1syYH6-0008ST-QY for guix-patches@gnu.org; Wed, 09 Oct 2024 11:06:52 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syYH6-0007nx-I7 for guix-patches@gnu.org; Wed, 09 Oct 2024 11:06:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=ux0mSKXFDDu6YMJofE0WffTZpE6xbY7874QwhlHfhCA=; b=HDu804Zs3e2tipJUUt2jvY6wyNZ4coa5TvTrorx/7rwRVP+x8oHQ3cSo7HbNpaKBNMI7LyA1/gkBacTKZ8v5K9ld+Mpyf7NArxjY42a8VIHfu25lZKhwBz9u84L3Wt+kDbo730CNrAcsr2G7IM0LFzanf6wrq1nqjVQnSvqNLrs6dqaVfi1yD677tCd/96O2ZJqT7Q5uqRjVQiq+wuUSjILzBIwJ9w7nxruf15lOw1zWLCaU429yZgnzeTVGkJj6yKhdzlnOnRWWB7/YiPi4a47Cm4OajFdsuqhyk4w1xcJwhRDUkRen8GIiEbqyEmsdeQe7r+W9CkVuhOj0AtD2lA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1syYHG-0005Ab-9f for guix-patches@gnu.org; Wed, 09 Oct 2024 11:07:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69554] [PATCH v2] build-system: cmake: Build tests depending on `#:tests?`. Resent-From: Greg Hogan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Oct 2024 15:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69554 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Hartmut Goebel Cc: 69554@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 69554-submit@debbugs.gnu.org id=B69554.172848638919811 (code B ref 69554); Wed, 09 Oct 2024 15:07:02 +0000 Received: (at 69554) by debbugs.gnu.org; 9 Oct 2024 15:06:29 +0000 Received: from localhost ([127.0.0.1]:57371 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syYGi-00059T-Pf for submit@debbugs.gnu.org; Wed, 09 Oct 2024 11:06:29 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:57723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syYGg-000597-FQ for 69554@debbugs.gnu.org; Wed, 09 Oct 2024 11:06:27 -0400 Received: by mail-ot1-f41.google.com with SMTP id 46e09a7af769-710e01dd554so3917621a34.3 for <69554@debbugs.gnu.org>; Wed, 09 Oct 2024 08:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=greghogan-com.20230601.gappssmtp.com; s=20230601; t=1728486310; x=1729091110; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=ux0mSKXFDDu6YMJofE0WffTZpE6xbY7874QwhlHfhCA=; b=LvDmlxIlNFCQmK5RY8GFU1E40S9lE91W0zUFWuGabDqB3t0sOGfvb8oitBPu+tHtvK 35mm/UW1XFxtt1vBNBRnhlgWhw7tOcURtxG/4Clfj++/SbJJj7s9zhc/S71WwbaV7QVM u+mm/NvJ2GTLPAbl4wOTXt2nMXm1Gtc7P9sOJ8CB1kjiwn06O1sPNg3U68hJ6pl3rzYk Ab9mo25f/OeTPKnfZnTsrBD63m8/eCqzpQU/VQpjlxJZN98uRwey2F2if+anHPR/KPrQ GycdLM9MbtLjZs8ohcPmm7+SYSJuSWx8SQM3Ih3nfkGF4bmD3qpGfzJSWUj/YW5ER9EM ePJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728486310; x=1729091110; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ux0mSKXFDDu6YMJofE0WffTZpE6xbY7874QwhlHfhCA=; b=YoMek5+VxEncTpoYgKE1DaoyEz01ccSbC9rqgAC11WPchu1mCe+ko5b7zbFWlssD5F O2CEA3yUOQLqoKNcaN7RWHQqRgkM4fxYJQJbMbyiIowICA+F5As471JtWc2DJuXnoJsE x+ZGdorVWKqFu3zEriERV/843iBK116IuWqqxZP/u/QfsltmQk2YJmXMm1YtjZ/djaZL UukmZSrHUTvBucjqLffyWau3ffJfkgrsWuq8AnUmlbEv3nmTL7lpTdntO9vdm5PMsopj BLMh1lG3csS2k7veE0YGwfJG7nwtL+pxHqn1AdtzuNEfjQm5P7eeTAY9jHh8heSbIHoK bAyQ== X-Forwarded-Encrypted: i=1; AJvYcCXODqn5KWs5U3ZIP12mW8onxAWMuHsAshw0kneISuLI57JQdEHje/4NQ4fM09kx+ILmYUZjng==@debbugs.gnu.org X-Gm-Message-State: AOJu0YyuSBW8TB8qO5uSfubnivNwm5X9eigR/UtReRwXoXC4nRKEDGp8 Z8F1XFwr9lLH1Z39T2JXvCVYu+xoB/seIKRiJ6w7glmquNrztk/wseMRwIJ/PUilQ/dnkiYA3Zp 55BLw32GahLWwhhq2eIuSq4Yik93RBV2OjQ5hxw== X-Google-Smtp-Source: AGHT+IEq9N2pQrbtn/N1enOJBG9R2eExvQf1MBRZrNWjND/mLd39KHS8f3cy1BzDuBvfg8koVslh8CG3dQo92c/Cslg= X-Received: by 2002:a05:6830:3883:b0:709:49c5:fd99 with SMTP id 46e09a7af769-716a419729amr2561678a34.4.1728486310431; Wed, 09 Oct 2024 08:05:10 -0700 (PDT) MIME-Version: 1.0 References: <7676fd973fa640750306df216feb95c335b345de.1709593063.git.h.goebel@crazy-compilers.com> <87ed7v0z8m.fsf@gnu.org> <079bf725-1855-498f-8863-d7ac7a6c6065@crazy-compilers.com> <59738aa6-a912-4b21-b559-1a952d7d6bb9@crazy-compilers.com> <7a1b7263-3526-43f9-910b-3148fb9b56ba@crazy-compilers.com> In-Reply-To: <7a1b7263-3526-43f9-910b-3148fb9b56ba@crazy-compilers.com> From: Greg Hogan Date: Wed, 9 Oct 2024 11:04:58 -0400 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.95 X-Spam-Score: -1.95 X-Migadu-Queue-Id: 006AAEAC X-Migadu-Scanner: mx12.migadu.com X-TUID: mhFi6BoETC9Y On Wed, Oct 9, 2024 at 3:32=E2=80=AFAM Hartmut Goebel wrote: > > Am 08.10.24 um 19:19 schrieb Greg Hogan: > > I think we can do this without warnings in the output logs or > modifications to the project CMakeLists.txt. We can preload > BUILD_TESTING into the cache: > > $ cat cache.txt > set(BUILD_TESTING OFF CACHE BOOL "Build the testing tree.") > > This is a neat trick! > > Did you check whether this also overwrites any default in CMakeList.txt? = Otherwise we might need to pass `-DBUILD_TESTING=3D=E2=80=A6` on the comman= d line, too. As I understand it, setting a variable in a "-C" cache file and with a "-D" command-line argument is equivalent. The only difference is the requisite precedence, and since we are not specifying "FORCE" for the "-C" cache file entries any "-D" configure-flags from a Guix package take precedence. I also noticed the following in my simple test project, so I am looking to also move these "-D" arguments into the "-C" cache file in cmake-build's configure. --8<---------------cut here---------------start------------->8--- CMake Warning: Manually-specified variables were not used by the project: CMAKE_INSTALL_LIBDIR --8<---------------cut here---------------end--------------->8--- This persistent cache is the lowest-level scope [1] so is overwritten by a "set" command in any CMakeLists.txt. An "option" (for example BUILD_TESTING in the CTest module) does not affect a normal or cache variable [2]. [1] https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#cmake-= language-variables [2] https://cmake.org/cmake/help/latest/command/option.html