From patchwork Mon Sep 28 21:09:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804655 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D0A86CA for ; Mon, 28 Sep 2020 21:09:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5D8F6208FE for ; Mon, 28 Sep 2020 21:09:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="U2B0+dIk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726590AbgI1VJW (ORCPT ); Mon, 28 Sep 2020 17:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbgI1VJV (ORCPT ); Mon, 28 Sep 2020 17:09:21 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C6C6C0613CE for ; Mon, 28 Sep 2020 14:09:21 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id o5so2812104wrn.13 for ; Mon, 28 Sep 2020 14:09:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=NRU+SyTyOR4yAioixTSvvEKcxKmJ15EAGq7udR67d4Y=; b=U2B0+dIkls5Dl6N2gsbAbVhnfMWwI59rjPsX0Ze8NRwXMBiV2kJcoBy4x7Fr1xl2zY Zq4EimZcaUcc3nstP67WZ6W8QtivSbmG9WkiP5c2kl4XvlxIFjwfWXoFAnXnwLYGVOyj +tm9Jv5/PMWn+QAZQ/cHHcqjth6HSW/Am/Goq4wzeShEbWGzxmhZ8nOMTetZt6UoXsPW aNfeg3eEqaKD7uJ4DFLBeaOoyDDlZztdhIfTq1MZWTT0we6Bo8nSlQyOGOemQrXRAy9/ w+vN9HbofAKpEFuAJ+BYKePngnBSH+KSGZe7g5G5NhqpEC3kzekdPLEPzLwnGfzG7P4j Q7Lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=NRU+SyTyOR4yAioixTSvvEKcxKmJ15EAGq7udR67d4Y=; b=eXY4QaXoM8RAn4AmUCAHdm6upkMI++cu0Pu1+4gwtIdmgDDJC0sJAdug48nNDVr2Hr jx7YR2aGNfbsZhZkP3GexzlEr846z1Pef0ZBjupfat5/NghmaycNsf/0wYjVfDcnZw0l RmwrzlCJr/YqZgqWR5ck4JEQ+w3JRaSG7COGXVQ1yhfMfz+DUCuvkkEsBLNZm5E01zD9 RswxYvRJVXIuc7KQMpLmR/S01jcWEzG+aCAKO7wpnxYWHvFuXLrMHXtLxspoJmy9ieQt OAILfdZBQjt6QDqWQxpJi3LmdfQYv/3yzFOPKDQKhleF6roYcAzLfG6kQqMSAMrOjTx0 bWNA== X-Gm-Message-State: AOAM531fPL6XH48N8HmIrIPYg+ZQ7RhhO5LakaWfhCGZZZvUDAvAE93m wS/MdzIzgiwqk97bVEOffDMvMOTyomY= X-Google-Smtp-Source: ABdhPJxl/qy8RVTmkAKFu87REbz4smONHPxWIig22Ib6fVq0KHR2MMHcxBzQdF7WRYDy4Ze+3GBqGQ== X-Received: by 2002:adf:ff90:: with SMTP id j16mr394030wrr.105.1601327359970; Mon, 28 Sep 2020 14:09:19 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id s26sm2534294wmh.44.2020.09.28.14.09.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:19 -0700 (PDT) Message-Id: <9c7a96451937c752899eb0e2aeaa0e6fc49cc62e.1601327357.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:06 +0000 Subject: [PATCH v3 01/11] cmake: ignore files generated by CMake as run in Visual Studio MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin As of recent Visual Studio versions, CMake support is built-in: https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=vs-2019 All that needs to be done is to open the worktree as a folder, and Visual Studio will find the `CMakeLists.txt` file and automatically generate the project files. Let's ignore the entirety of those generated files. Helped-by: Đoàn Trần Công Danh Signed-off-by: Johannes Schindelin --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 800b812c6a..6232d33924 100644 --- a/.gitignore +++ b/.gitignore @@ -242,3 +242,4 @@ Release/ /git.VC.VC.opendb /git.VC.db *.dSYM +/contrib/buildsystems/out From patchwork Mon Sep 28 21:09:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804659 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0FF366CA for ; Mon, 28 Sep 2020 21:09:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF7CA2193E for ; Mon, 28 Sep 2020 21:09:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ezSNJgbU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726742AbgI1VJZ (ORCPT ); Mon, 28 Sep 2020 17:09:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbgI1VJX (ORCPT ); Mon, 28 Sep 2020 17:09:23 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4A00C0613CE for ; Mon, 28 Sep 2020 14:09:22 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id t10so2876818wrv.1 for ; Mon, 28 Sep 2020 14:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:mime-version :content-transfer-encoding:fcc:to:cc; bh=wJhsn9s9LUmr1GfM3h5PzVUuBc9RI5okijDIrwGDNOI=; b=ezSNJgbU2MJt7rnO2aBx8waougkukLT054gPpOBbcHBtljfdhuEuW2GKPPqxCdwCfR 3LS5moofPjDLsjuNjFYNszGvzEkpQA/9Q2sEaKKwvndTOXvLCTFG9gM7Vx8e+oKvQJYk SKoFTZ1OwCe26LcljlT5SGKYRJlZj9jJ5Yv9MLIlKTPFgIW1DG4KICc5s6h7HHUcN9Pi Q8agIFu2hdcEAciK4O01ZrAkMRgQK+9EjB81Mh9ln2Mmc+JZGsPH3Meu9BCkB1bZjKZ2 SkuLYsmhpXFFIBzfr5j743Gl83Gc5EVr0JCOoJ5rXF394lbpw9Xj6PPv4Sx1vVTAM9/4 D9Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:mime-version:content-transfer-encoding:fcc:to:cc; bh=wJhsn9s9LUmr1GfM3h5PzVUuBc9RI5okijDIrwGDNOI=; b=f5NR91mgYgTkNb8c5QCQyssA5q7RK/XroXex16vO4E7rd81uGShcG04WQQ4R/dCalh /wCt1EjpIB7wNf1IdnTqg5HEc7sTvcsm/cT1P5BDJXcJRLxd6L0+QvZDpaqWbTXKSYRB B1/qWWhbnQEPQ71ONooEOMZPkrjYlgIHdyV+YDH8DWHfDT4HrbwiLJSr6FPVji4BNI6X 50qoZgTI2XVN7ZEeJvBlUMRtecEdRXuAXYyiUVmLPfBwSnFUiEgYPtlgj3mNMj+pQ+mz ZOgQ4MWkXqZ5UKZteXpHDlhVJMdi8GnEUtlU9sUuT+nY2gex1mdqBLHargj9kwNoDSfZ eXnQ== X-Gm-Message-State: AOAM531ni7gtTAx1pmh70h3EJx0KgReb3oJD2+/cbN+ZYE8EJIXQnqPs SHEa+Rn5MWK8IhVjt1RoTp+kY9uC+tQ= X-Google-Smtp-Source: ABdhPJxtBlKHQdRgT1kYg0SKEQpoX9zPn/8j4FJLlpMBvUCIdxfn17dd/jZ7wEGRgYEfeCO+rR5MJQ== X-Received: by 2002:adf:ed12:: with SMTP id a18mr418773wro.178.1601327361258; Mon, 28 Sep 2020 14:09:21 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q4sm2791602wru.65.2020.09.28.14.09.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:20 -0700 (PDT) Message-Id: <3b467360bbc2c03474a7f704d23b1fe1df56dc49.1601327357.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:07 +0000 Subject: [PATCH v3 02/11] cmake: do find Git for Windows' shell interpreter MIME-Version: 1.0 Fcc: Sent To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin By default, Git for Windows does not install its `sh.exe` into the `PATH`. However, our current `CMakeLists.txt` expects to find a shell interpreter in the `PATH`. So let's fall back to looking in the default location where Git for Windows _does_ install a relatively convenient `sh.exe`: `C:\Program Files\Git\bin\sh.exe` Helped-by: Øystein Walle Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 5007f173f1..1847a6fd58 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -41,7 +41,7 @@ cmake_minimum_required(VERSION 3.14) #set the source directory to root of git set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) -find_program(SH_EXE sh) +find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin") if(NOT SH_EXE) message(FATAL_ERROR "sh: shell interpreter was not found in your path, please install one." "On Windows, you can get it as part of 'Git for Windows' install at https://gitforwindows.org/") From patchwork Mon Sep 28 21:09:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804657 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4AA70112E for ; Mon, 28 Sep 2020 21:09:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1FCD82100A for ; Mon, 28 Sep 2020 21:09:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="VFZ+/In0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbgI1VJ0 (ORCPT ); Mon, 28 Sep 2020 17:09:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgI1VJY (ORCPT ); Mon, 28 Sep 2020 17:09:24 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 308DBC0613CF for ; Mon, 28 Sep 2020 14:09:24 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id e17so2487146wme.0 for ; Mon, 28 Sep 2020 14:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=vcskzXK9EhFcrWXUKoLHVMIaYwYhGcUQ60l9JuhR1gY=; b=VFZ+/In081xd0Xy13K7OLHxE0F77WfZ6r4QX+tTDNWdnRBIItSv2oAe7v483TQyGn4 G8FWTBMukZhWONml1t9YbVf1mwP3m0jEp8ygFgK7TqJ9aYQzyKPvKFI2St5Yp9McFFTV QbMc29CcadNeLjHJMvLR5vY14ghe5P1T8DLgLXAZu2GHukh9QCG6ttfmMqjPhfnJcOd8 BRPzkL/T3RTGzXaacpxuwB8srbrCL6jn9Lww1n6mhl1RhZEikJ1Xg3u0R3/97w0cQuez /QMAFdiXbv+nWEi42T8fckywxV5CiiavzVJXWRAVM7ZvlvExkZdzv3aRPeiGy/YniTlL LDoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=vcskzXK9EhFcrWXUKoLHVMIaYwYhGcUQ60l9JuhR1gY=; b=DI/fvKtMwKEgRHPGBEpXaDHaW4mf/bflWLSfJ2GC+KB/A4W+rQFqkmWVissHbH7eMK 1YpW+bCmfy0Oc4iuerZTJLU31v8HKetiYohVnJebCpfTnFN6egYSXqDV03bipsHQxdm4 qJ6+ipKzBkkMUAAIQgKdaW5lHmKxRYtzVvgQMYT+WD+lu1axof36BScEoNzF5vHSB+/N dsOySZ0WCbtbzPKLuvAmgUTEaOEYbdaIRbKGyHicw4RVvGGJBeoZKe+3gq6PH5LgVq9A YWM+AipHEdQtImvlM3rdBpHZN3xfRAaZUWlVmvKeAvP/XNNmB+xiENgA1ql/aLYierlP 8TIw== X-Gm-Message-State: AOAM532MRLyhEgolokxoBzycj4xh5HFlQSBZ0kiwMYQlOrB5pgeRiHjH 7nEfd1TR+xNjvD9LDUhpqN3HnrgK//Y= X-Google-Smtp-Source: ABdhPJxdYOTWYuCeCSF3SThWbNafBiawGwaU1+UlG0Gcdp/Y9cWAWEPhuk5n3Ptsw21MBCglKpmmFw== X-Received: by 2002:a1c:dd87:: with SMTP id u129mr1007304wmg.172.1601327362620; Mon, 28 Sep 2020 14:09:22 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id d20sm1751088wmd.45.2020.09.28.14.09.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:22 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:08 +0000 Subject: [PATCH v3 03/11] cmake: ensure that the `vcpkg` packages are found on Windows Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin On Windows, we use the `vcpkg` project to manage the dependencies, via `compat/vcbuild/`. Let's make sure that these dependencies are found by default. This is needed because we are about to recommend loading the Git worktree as a folder into Visual Studio, relying on the automatic CMake support (which would make it relatively cumbersome to adjust the search path used by CMake manually). Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 1847a6fd58..12268f61ba 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -40,6 +40,13 @@ cmake_minimum_required(VERSION 3.14) #set the source directory to root of git set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) +if(WIN32) + set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg") + list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/x64-windows") + + # In the vcpkg edition, we need this to be able to link to libcurl + set(CURL_NO_CURL_CMAKE ON) +endif() find_program(SH_EXE sh PATHS "C:/Program Files/Git/bin") if(NOT SH_EXE) From patchwork Mon Sep 28 21:09:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804663 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 193101746 for ; Mon, 28 Sep 2020 21:09:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB4212100A for ; Mon, 28 Sep 2020 21:09:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="q6SiC/xE" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726860AbgI1VJ1 (ORCPT ); Mon, 28 Sep 2020 17:09:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726409AbgI1VJZ (ORCPT ); Mon, 28 Sep 2020 17:09:25 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F686C061755 for ; Mon, 28 Sep 2020 14:09:25 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id e2so2559832wme.1 for ; Mon, 28 Sep 2020 14:09:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=SbWyixT4xQU5T8fvNxqPN5QRWcIo+QSrGmmPklZctcI=; b=q6SiC/xEhtT8HthTOnKXsNh2B52igc+DSrHR2ahvc5CHzeWX+l0KRbwUn0/vlwMBJI O1//vifMHb5eZzAwyqQ0luEmrzJRQoZeawqEolYylF88rm+EVZtKf50zhDubzDpyvKtw 0mgtztb5quN3V5zF/RDTEBGASAggIvqyd/x/qSlaFUHGDHq/oxl77wVEs1BxLTWN2YPl 5ee8jl3ejivmAkZ3K9n6dKZ7mOteTGF/6q9fVBckEBdIZQFrIilO/Yo7lAJl4wdKs5ui LDBM+9LiQcVIwnL/XUJZBoMO3ILskN0r5cMGIbGMxVPyH2mHDMS2V6t1Go4RvIdft49N Fo1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=SbWyixT4xQU5T8fvNxqPN5QRWcIo+QSrGmmPklZctcI=; b=G+xdoNjzcz6ypQ5/yXZZ6vh3pSaB6ggHlttTd0aDdQgtVsb+APcUJYPJjBz84l5SbP tesrqGWwTDu3E3zBSMcflDyvAV7iM6ptCq2xS94Tz/EuR85FW3hJ+qY7KrE333wHBPsK 9yqVREz08yrVO/KaFtGxwwHObK73bf2PTQUHSjzNfmBzMy9x50ozJTnpIXjZ6DvxCa+o YPV4D9DMQfE5qSlEHA7LkSHLjz8elhPxy825f6aGd2mo6DcfH72nUjnH01ELx9N4vlVx JbKZlMF5pFaxLlHmzXo4GDdps8KyVTbz+wRoWTXFafCEasM2RYPSUp84sOIpctKVPlBj VjFw== X-Gm-Message-State: AOAM5319PKg21gk2ny68ScaD0tpYNzTQ8bkIOkLqAjhoOB0AM5QECLZP odVdOl70MjSIuhzuYfjBW8A+5z8okMo= X-Google-Smtp-Source: ABdhPJyqJrLNYJW1UuFVLEFKIp635HSHcpjCgrbGkLrvw1VC2dpBMO2ripGP3xa0za+9MqOhrAP8tg== X-Received: by 2002:a7b:c151:: with SMTP id z17mr1060662wmi.53.1601327363811; Mon, 28 Sep 2020 14:09:23 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id t17sm3030204wrx.82.2020.09.28.14.09.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:23 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:09 +0000 Subject: [PATCH v3 04/11] cmake: fall back to using `vcpkg`'s `msgfmt.exe` on Windows Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin We are already relying on `vcpkg` to manage our dependencies, including `libiconv`. Let's also use the `msgfmt.exe` from there. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 12268f61ba..683cf38263 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -152,7 +152,11 @@ endif() find_program(MSGFMT_EXE msgfmt) if(NOT MSGFMT_EXE) - message(WARNING "Text Translations won't be build") + set(MSGFMT_EXE ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg/downloads/tools/msys2/msys64/usr/bin/msgfmt.exe) + if(NOT EXISTS ${MSGFMT_EXE}) + message(WARNING "Text Translations won't be build") + unset(MSGFMT_EXE) + endif() endif() #Force all visual studio outputs to CMAKE_BINARY_DIR From patchwork Mon Sep 28 21:09:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804661 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 827476CA for ; Mon, 28 Sep 2020 21:09:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 60BA5208FE for ; Mon, 28 Sep 2020 21:09:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gcHsyYTT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726874AbgI1VJ2 (ORCPT ); Mon, 28 Sep 2020 17:09:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgI1VJ0 (ORCPT ); Mon, 28 Sep 2020 17:09:26 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A264C061755 for ; Mon, 28 Sep 2020 14:09:26 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id x23so2486959wmi.3 for ; Mon, 28 Sep 2020 14:09:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=qn/TZyUJ7bX+EzhR76rXOL+D7+sWwMfvqSis+eDb0S8=; b=gcHsyYTT+rCMK0vAzEQL3NUgorokPjPoyvzt93zhAI0Y+Rqhiiv2LJbP36J6vQUWVp rWCm94giM1aMbYr2MXhcJDABt9TbIijx7GQhT2bTStixMz42JboRI6R6jG8/25Na3vLz jMyNqqq7GZtAaetwqpyGwyIt4J+QjeqVXhLKWpvaB5F44H+zeAV/I62QYLGqdNVGwGfU EO63G3It+dfWmPV2F3I2VnBqEV962wbkML6FuogyqdvcG+b7JfSG2TPQkgByefQZOf82 j+NJjFQE22Ki2I9HgQkSW0XAUe5EtE/f+5zYhedWKEcnz+m1GJ/LYhqVUE/G9nPa+BYc yOdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=qn/TZyUJ7bX+EzhR76rXOL+D7+sWwMfvqSis+eDb0S8=; b=DIFcRAdyZWXKYO5BvpxmjHY3U203iT8sEV2MZKD02kzHmDktdhoZHBcDU9sKSJkJSi RswYj7XNYy6Y7dHuR5h4ouChAWnTD8EEhmSyqYbATnMojssjwvgPdGoNVNB4XW90oRQ6 Zw7B1NBYIL/DT45TFzhTSKMfpuqygou3RogAiOJ1OOzfg5Eg8HmWsH56/PXz7TI0caUB YZ80oM+LNz9LX3ZQyRSHzmYkxmPLRckvGzla2JdaQr6smZIyVwRtUoK0DGCO/4IW6F3V Df93N9iGN/fLjSLPrA3IDYAKBmsZrYIYRwDpZKbHJZAOzdam/9qNwnVg60dguH+4LX77 HhMQ== X-Gm-Message-State: AOAM530ehOR0mtnUWNDz78+jxs8qcQ0a6NUTTTagmozy2aWdTjNmmBtn JB/8A0GIVVBrQaT3E+p23eneoTU6atU= X-Google-Smtp-Source: ABdhPJwMkvIFGrh1pjs1V56wRVnxF05YKcVsCxA1XYBCAQvR8YSshI1+xNYrwJuKfoA2RDjM1O1lxw== X-Received: by 2002:a7b:c111:: with SMTP id w17mr1088773wmi.28.1601327364736; Mon, 28 Sep 2020 14:09:24 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id q13sm3108715wra.93.2020.09.28.14.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:24 -0700 (PDT) Message-Id: <8380aa55ab53aeb552de5eaf4bdae92bba71c958.1601327357.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:10 +0000 Subject: [PATCH v3 05/11] cmake: quote the path accurately when editing `test-lib.sh` Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin By default, the build directory will be called something like `contrib/buildsystems/out/build/x64-Debug (default)` (note the space and the parentheses). We need to make sure that such a path is quoted properly when editing the assignment of the `GIT_BUILD_DIR` variable. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 683cf38263..1999db0c6b 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -949,7 +949,7 @@ if(NOT ${CMAKE_BINARY_DIR}/CMakeCache.txt STREQUAL ${CACHE_PATH}) file(WRITE ${CMAKE_BINARY_DIR}/CTestCustom.cmake "file(STRINGS ${CMAKE_SOURCE_DIR}/t/test-lib.sh GIT_BUILD_DIR_REPL REGEX \"GIT_BUILD_DIR=(.*)\")\n" "file(STRINGS ${CMAKE_SOURCE_DIR}/t/test-lib.sh content NEWLINE_CONSUME)\n" - "string(REPLACE \"\${GIT_BUILD_DIR_REPL}\" \"GIT_BUILD_DIR=\\\"$TEST_DIRECTORY\\\"/../${BUILD_DIR_RELATIVE}\" content \"\${content}\")\n" + "string(REPLACE \"\${GIT_BUILD_DIR_REPL}\" \"GIT_BUILD_DIR=\\\"$TEST_DIRECTORY/../${BUILD_DIR_RELATIVE}\\\"\" content \"\${content}\")\n" "file(WRITE ${CMAKE_SOURCE_DIR}/t/test-lib.sh \${content})") #misc copies file(COPY ${CMAKE_SOURCE_DIR}/t/chainlint.sed DESTINATION ${CMAKE_BINARY_DIR}/t/) From patchwork Mon Sep 28 21:09:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804671 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9B66A6CA for ; Mon, 28 Sep 2020 21:09:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7551C2100A for ; Mon, 28 Sep 2020 21:09:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BwY7J5YD" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726935AbgI1VJg (ORCPT ); Mon, 28 Sep 2020 17:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726865AbgI1VJ2 (ORCPT ); Mon, 28 Sep 2020 17:09:28 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6137C061755 for ; Mon, 28 Sep 2020 14:09:27 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id d4so2476097wmd.5 for ; Mon, 28 Sep 2020 14:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=Xfo38AuyHcLNa8/91Ulhsub9WGaHfYjdgMuwmOZ1tG0=; b=BwY7J5YDU+DIjrHHFNlw985x5/CNcfDtxqi2yF94SYVgFVIYxtGuqNGjv3jdn9n9Dv q72HiJhPeFs8QrtRZqfZm07XbJ8KhgyCYY54coZ2sxvsgmBj9xafvIblb4zZjLypkQ7X a0PMB2Cnad2TBuQ0gdAus24I3jXIYJvQhS93Ww869pwIzIEJNXMkpsCT0ZEqRCrmCimG dQekcW9AsNplI/uZ2B7a7ZoBUW6aX6fzXusHFLC+G9q9kQrC2LukMlDpvkw7XiODt7UV vrlpbiuijbV2Gop3CR8N7RM17uLXMkuiv14AQMIV+lrDUcblRmsqCkgJZFo6hx4PUzBd lHog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=Xfo38AuyHcLNa8/91Ulhsub9WGaHfYjdgMuwmOZ1tG0=; b=Kbh7CjZuCrgxHwvVWTMVsKS0GLt1sNqfSO7p9MeNRgDt4imXt00OnjkPhuLYwAGuyo 0D3H+DqWn3FLukwf4Nv16gNPH8hYFDyTi7IV+DaLzyBzVr7wXUETfp5jeRjtR0icdSHO 1q9WrKKJYJNRhMb4NHH+jkqjJaIHOJKBisiTTQwRBuNjBy4/SKBPArl2vsBE0h4lwdQy UIuNx+f1pa/7ZpZ+cfuQkOnRn7umoHIs4zIJ8OMzY3nLKqKu3FJjKnHlZ84iqqJI/QYe 7lPsUJkfpkhkkv1mXBlpiLVgafsmfI0NUyGLMvs11nXTgs9NrX7/B2fyf22P0d1gQf4H YVow== X-Gm-Message-State: AOAM532zN07qksrBDZBhwBI9grC6/thvq7yc4GBJhQ11EPybuWBwvzL1 fh4CuCKkX8cbcXMOUmbqTPbQE83iURw= X-Google-Smtp-Source: ABdhPJyLvTWkSeBqQXu1wGYs8wqdGdHc6MBR8OY8+AIhusNwuYWhF6T/S8Cl/xG1bnRosjwpnwmFQg== X-Received: by 2002:a1c:bcd4:: with SMTP id m203mr1037337wmf.70.1601327366030; Mon, 28 Sep 2020 14:09:26 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id 63sm3510441wrc.63.2020.09.28.14.09.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:25 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:11 +0000 Subject: [PATCH v3 06/11] cmake (Windows): let the `.dll` files be found when running the tests Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin Contrary to Unix-ish platforms, the dependencies' shared libraries are not usually found in one central place. In our case, since we use `vcpkg`, they are to be found inside the `compat/vcbuild/vcpkg/` tree. Let's make sure that they are in the search path when running the tests. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 1999db0c6b..361fe3de6d 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -939,6 +939,9 @@ file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "X='${EXE_EXTENSION}'\n") file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_GETTEXT='${NO_GETTEXT}'\n") file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "RUNTIME_PREFIX='${RUNTIME_PREFIX}'\n") file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "NO_PYTHON='${NO_PYTHON}'\n") +if(WIN32) + file(APPEND ${CMAKE_BINARY_DIR}/GIT-BUILD-OPTIONS "PATH=\"$PATH:$TEST_DIRECTORY/../compat/vcbuild/vcpkg/installed/x64-windows/bin\"\n") +endif() #Make the tests work when building out of the source tree get_filename_component(CACHE_PATH ${CMAKE_CURRENT_LIST_DIR}/../../CMakeCache.txt ABSOLUTE) From patchwork Mon Sep 28 21:09:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804673 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D9CA6CA for ; Mon, 28 Sep 2020 21:09:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 346DB2100A for ; Mon, 28 Sep 2020 21:09:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BlgpsnPg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgI1VJh (ORCPT ); Mon, 28 Sep 2020 17:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgI1VJ3 (ORCPT ); Mon, 28 Sep 2020 17:09:29 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8DEFC0613CE for ; Mon, 28 Sep 2020 14:09:28 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id k18so2534684wmj.5 for ; Mon, 28 Sep 2020 14:09:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=P+1UcXSjxVBg36V9LODbOciDWEAxpf7ke05kH2Rw6l4=; b=BlgpsnPgwUFUOVCacQTSuB2bLyb/o7weDCtc+M1m3dQnGKWJacVufxOcAJl8X3iNgy QH8voLm/lxMOXR5d3VsxJmd+HGDzYR/5zCQUMrBLd5nKAfr30I6dW4XXjzRk1/SL4ny5 EKrTaOu+rCYGupumUKYd/mwIokW2avZs7Md/qSIT4FTDNrznyVU+lekkxTGwfx+KLoPQ GMgemhJGibS+Fv/b0nSI7Pnqjflc+QjZKRFBE90IJY8UYC35eJGXi9+6U5m3C+CE6zKi S5IUwG4vIRnnidJicZKyFHONvXkFBYXcjwzEp6rPNC2ndQxyuxdLlMDyJx09qooXBWl4 0j/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=P+1UcXSjxVBg36V9LODbOciDWEAxpf7ke05kH2Rw6l4=; b=LwjHzMFWd6011PWJUF8p9HTmYj1+qtFPGmfwzzKpBpfkZwejhRDJDfx/I+G6GFTE/O XFST5Ae1FXb+sxYbiA7m/fr3jb8BDSkIngTgXfO1VtHip5PZ1LTIDpgWg3GuoFol585J fUPvC0pjqY1t0fY4HrKYm1J75rcUfjQ1MmWDHXUbteq1M1Py1W9MbxWtuPSYifmhruAo 2HV2Fu+Aj++oIkaxqsPZub8zvEToDlMPva11JhmrSMoVq23bZZ7b/fE3dbBdnzDCPGUK 50J6Bbtgv51AgIRkYv2qGDrblxmcJtfT5AH7jqa+qdczxZuBLi597PuAfqjgBPuQ2dBt eRvg== X-Gm-Message-State: AOAM531v8IhKTmc46ep3hceciQZskc5fUgigPFjkC1BjyRRrUtb9ro8D rTO0Z1TZuHnIH3R+/fQeSvt9k0ZEFOo= X-Google-Smtp-Source: ABdhPJxka1bKlYStnU2i6CsEjtyicL4EL9/0CzrjzwENPpgXZDTkp0YIcX4Jn4+GR40bY76ZwIVdjQ== X-Received: by 2002:a1c:4b17:: with SMTP id y23mr1010548wma.162.1601327367339; Mon, 28 Sep 2020 14:09:27 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id h204sm2704970wmf.35.2020.09.28.14.09.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:26 -0700 (PDT) Message-Id: <7a4346a437b9bf1ebddafa5f3d92c118793c0078.1601327357.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:12 +0000 Subject: [PATCH v3 07/11] cmake (Windows): complain when encountering an unknown compiler Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin We have some custom handling regarding the link options, which are specific to each compiler. Therefore: let's not just continue without setting the link options if configuring for a currently unhandled compiler, but error out. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 361fe3de6d..13d958f5a6 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -617,6 +617,8 @@ if(WIN32) target_link_options(common-main PUBLIC -municode -Wl,-nxcompat -Wl,-dynamicbase -Wl,-entry:wmainCRTStartup -Wl,invalidcontinue.obj) elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC") target_link_options(common-main PUBLIC /IGNORE:4217 /IGNORE:4049 /NOLOGO /ENTRY:wmainCRTStartup /SUBSYSTEM:CONSOLE invalidcontinue.obj) + else() + message(FATAL_ERROR "Unhandled compiler: ${CMAKE_C_COMPILER_ID}") endif() elseif(UNIX) target_link_libraries(common-main pthread rt) From patchwork Mon Sep 28 21:09:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804677 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8618D112E for ; Mon, 28 Sep 2020 21:09:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5FFC12100A for ; Mon, 28 Sep 2020 21:09:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hth0doFF" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726919AbgI1VJe (ORCPT ); Mon, 28 Sep 2020 17:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbgI1VJa (ORCPT ); Mon, 28 Sep 2020 17:09:30 -0400 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E26F2C0613CF for ; Mon, 28 Sep 2020 14:09:29 -0700 (PDT) Received: by mail-wr1-x444.google.com with SMTP id e16so2882603wrm.2 for ; Mon, 28 Sep 2020 14:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=rX2Dj+oWrd4r59ndA5A4C2d6k95oGn7NtTa+QgL9tws=; b=hth0doFFak+NAmXfuXJzhV3xNlJ4E8ZJFrhzgnrMm9hT1NGWmXShhb2dh9AdTfBJec u+Qt5dJt9j9W570NoYZ2tvrffDeKdospkLiwK4XVBj2C2uNKG8VhwZGx6E0bCnB2Qeek dAjC3G/OuhSS2aeUJQUUMMEK9f0nB19pKJU6iCJWzvG5yO6itP6TZs2KUnhqTwwb9SzO ZyCLjlUPn1k421Wm16SVVwegewCcoV5EK3/6+Q0KCGk2HuuAd6SnM5HAFpkr+2e4WFm2 lA/KIoC8jFlL7sB4ZKKVb4XjCyMvJKY1qCOADR1m9tpmPgQzwhbo6X4AxMnnsm+5NZyO Pbyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=rX2Dj+oWrd4r59ndA5A4C2d6k95oGn7NtTa+QgL9tws=; b=NKLnCsyJs2hNnLQsXdDhGy3R9el/H4yBRmjrFg3+30y+cTubl18WeP9nM4Mhce0ijN 0FS6N7ERmpdfSOImKfiTh0EXxZnO7+A1eetCilg0QkfUtcXMSz22laAhHLCek6OQ3Hxx oDR9YsRKk3MlZIgjeSmiW9rd2+EBkyMO+yS7Xh3Oys/zwkve2ZU8SYYP7zYC7eIM9pOF Pu+x/63el8vr54N5wXrkzzxwWI3TECuvJvRgOhokRvTRkWAFgBVlmXOdo26gsBIjNRSX 02loiciOMSNkLotz6k2Oh1T+aa4rw9t48HcJjpDtXXNLrwcsqHpr2Z2RgpDmZzirSI5Z BCDg== X-Gm-Message-State: AOAM533mJUk+fOe51vPANSEsNb/Dzf9j2kkJT1ch6Uksaf2AbGn8XeeM X/mMP3XnYWu5ez2WV80HZ+cLZy0sLtA= X-Google-Smtp-Source: ABdhPJyfqQjTgYM0qXgadHfADaBy5oskyuF2S72L+UA64uCkspYUT9EPDB53LZTPqL4qgI36MJFDlA== X-Received: by 2002:adf:dd88:: with SMTP id x8mr418189wrl.54.1601327368356; Mon, 28 Sep 2020 14:09:28 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id m13sm650624wml.5.2020.09.28.14.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:27 -0700 (PDT) Message-Id: <7c1601c7e351855fd720df05efc44440374792ce.1601327357.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:13 +0000 Subject: [PATCH v3 08/11] cmake (Windows): initialize vcpkg/build dependencies automatically Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin The idea of having CMake support in Git's source tree is to enable contributors on Windows to start contributing with little effort. To that end, we just added some sensible defaults that will let users open the worktree in Visual Studio and start building. This expects the dependencies (such as zlib) to be available already, though. If they are not available, we expect the user to run `compat/vcbuild/vcpkg_install.bat`. Rather than requiring this step to be manual, detect the situation and run it as part of the CMake configuration step. This concludes our journey to make it as effortless as possible to start developing Git in Visual Studio: all the developer needs to do is to clone Git's repository, open the worktree via `File>Open>Folder...` and wait for CMake to finish configuring. Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 13d958f5a6..6a92ec9763 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -42,6 +42,10 @@ cmake_minimum_required(VERSION 3.14) set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..) if(WIN32) set(VCPKG_DIR "${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg") + if(NOT EXISTS ${VCPKG_DIR}) + message("Initializinge vcpkg and building the Git's dependencies (this will take a while...)") + execute_process(COMMAND ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg_install.bat) + endif() list(APPEND CMAKE_PREFIX_PATH "${VCPKG_DIR}/installed/x64-windows") # In the vcpkg edition, we need this to be able to link to libcurl From patchwork Mon Sep 28 21:09:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804669 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2278913B2 for ; Mon, 28 Sep 2020 21:09:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EF1F721775 for ; Mon, 28 Sep 2020 21:09:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OpftEE7i" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726929AbgI1VJf (ORCPT ); Mon, 28 Sep 2020 17:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbgI1VJb (ORCPT ); Mon, 28 Sep 2020 17:09:31 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E435DC0613D0 for ; Mon, 28 Sep 2020 14:09:30 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id t10so2877137wrv.1 for ; Mon, 28 Sep 2020 14:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=59x1AmiheC+liIcCpQBp+o2x9UMjcoDT6jZnO4S/gkM=; b=OpftEE7id4G7NinoheatBxRXOPw5YB6tHpEf80IQuZPFxh5pRJUADiE2f8oS1zi4vr 7QnG1RmOR7udDhNPDmnWVDH2h0xguQZKT1lfP+uEqneKX9krtcITcSvMf3SVQ3P9cmWr YHr4DXi+BPw+brYFCBQeyDylQCiPG0Bup47n4FzNA/NOiogV2PAYooi/NsTtyVCCNEUM jzxG8oW79vH2hlCOShGxTP6+slYudmqoSUxXpGYr6Lo3qZbPJpOcCWYK8BzyBn4v0mZW SJYRNnHANR9dUfm8zYA1PjaGihONvXmWUhrPcNOQLWHnwS/T0LUqgnSjfeY2IpVu+KTX FTaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=59x1AmiheC+liIcCpQBp+o2x9UMjcoDT6jZnO4S/gkM=; b=VyfZZTcVp/VwmrX8F1rqhCIAbVKz9E88PfOvThxs7PkYgf58qMe2uguxWXak6ATCMA MbGO8yn1EYrl9SzQDXWDxj/tedVlQ/rvHGwGEBK/WhgfajWRrTFXzs3S6G3tcg/a7qVM Rx5iQ+1dEpAOra0K9YLlGTq5m8yjBsPANsarJtVXG4y942a49qW8MqA6xcTosvum2tF6 ixGmvvBLgoNEuNAAGNTWjWF3RJEWh7F8dHerRx8o9JhOYWDjIoSy5epNoSjLChIUcMWB fgGUhe8ppy+K+CQRe5mQhHUNbbBM2vonySJAF8QMs6q9MFGAfpK31OCjrM5atdNVpDry p9Iw== X-Gm-Message-State: AOAM5336YapIbT+nlNUOItA/8h4+RF4/vHAtabjWoYApXvkQPvQTBYet 1XzRaMIIDKLapdvl+YYV3T0LMdllw2s= X-Google-Smtp-Source: ABdhPJznrDiXq1yZgnKYQqxa9OSqroz1PI0IkbsqH7yBtMHDEd1p5EiSzncN5CxNVEMIwCRAgPIchg== X-Received: by 2002:adf:ba4f:: with SMTP id t15mr333684wrg.335.1601327369481; Mon, 28 Sep 2020 14:09:29 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id x16sm2917506wrq.62.2020.09.28.14.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:28 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:14 +0000 Subject: [PATCH v3 09/11] cmake (Windows): recommend using Visual Studio's built-in CMake support Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin It is a lot more convenient to use than having to specify the configuration in CMake manually (does not matter whether using the command-line or CMake's GUI). While at it, recommend using `contrib/buildsystems/out/` as build directory also in the part that talks about running CMake manually. Helped-by: Junio C Hamano Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 6a92ec9763..4b16744847 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -4,17 +4,25 @@ #[[ -Instructions to run CMake: +Instructions how to use this in Visual Studio: -cmake `relative-path-to-CMakeLists.txt` -DCMAKE_BUILD_TYPE=Release -Eg. -From the root of git source tree - `cmake contrib/buildsystems/ ` -This will build the git binaries at the root +Open the worktree as a folder. Visual Studio 2019 and later will detect +the CMake configuration automatically and set everything up for you, +ready to build. You can then run the tests in `t/` via a regular Git Bash. -For out of source builds, say build in 'git/git-build/' - `mkdir git-build;cd git-build; cmake ../contrib/buildsystems/` -This will build the git binaries in git-build directory +Note: Visual Studio also has the option of opening `CMakeLists.txt` +directly; Using this option, Visual Studio will not find the source code, +though, therefore the `File>Open>Folder...` option is preferred. + +Instructions to run CMake manually: + + mkdir -p contrib/buildsystems/out + cd contrib/buildsystems/out + cmake ../ -DCMAKE_BUILD_TYPE=Release + +This will build the git binaries in contrib/buildsystems/out +directory (our top-level .gitignore file knows to ignore contents of +this directory). Possible build configurations(-DCMAKE_BUILD_TYPE) with corresponding compiler flags From patchwork Mon Sep 28 21:09:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804667 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9A58112E for ; Mon, 28 Sep 2020 21:09:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9F09E2100A for ; Mon, 28 Sep 2020 21:09:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="csU+b3sh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726923AbgI1VJf (ORCPT ); Mon, 28 Sep 2020 17:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726897AbgI1VJc (ORCPT ); Mon, 28 Sep 2020 17:09:32 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC9AC0613D3 for ; Mon, 28 Sep 2020 14:09:31 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id s13so2470195wmh.4 for ; Mon, 28 Sep 2020 14:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=fLx/oqN4eboVCzSUB4omppsZm0evzi7MY+4v/FyZl7s=; b=csU+b3shPAck+pZl3KnHTdI76KDuZnl4fpulOZPm2jS38hMi4qjYDqUo5nQ8HKfA+u /4tYmETG/PrakUiKZTRc53SRc6A+NW0F0u3PsiDA2Li+p3ALueA+RIZj6/RWm6/99NFT UiXhRVaK8f7096LgiTpvfgsorQYptMQezt0n5KXK3Jzgv+F9E9xAdyzvfAY/pqRiV4hF Hkrd6jvRGyWKHzwUow7hIbmcAi4DGyZ0MZp/e+nHxODI8V5ydpZAuxXGL1nP8PIYs56I OW/bE4yKa9UbJCiNPk3VNQYmM//Qur2MvKmqRcSDBz6mHO2JxE4h9irHjq9deDM7v7V6 PNFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=fLx/oqN4eboVCzSUB4omppsZm0evzi7MY+4v/FyZl7s=; b=MIkYOf/NffKeBXU+n9/Hp2N9TV33eKKTZYcmj7VVJkCWQ0EcuPkSeeZkQha9yRUbSb SzXaGAbePxaYi7p11LUOiozY7Lda//+MdniIwDl4d4wpFAR7uWNG53G2eqB+DlNykTgU w7Sd8VOaxfUkogEc8/Ayu9K9FiHDlA1vKSX9FhZZZhx4a0zPz4Xdq4O0KtOxD4GeuEgF KywmB+PW5V38AflmgyGPNh8RJHvhLyy+BhdqAk3NsxXHsmCgBhFAfTPSStRf8tlaL7Z7 MmzPMVWrmIbesKECpSNC5cmC24k2cv3cyWMcIqe4+6y+/qpma4GISPfrtHpyqjfuwZ2v xMhw== X-Gm-Message-State: AOAM5323oF+11PlaSRrAyVd46lKrqpJDHgkJdHNfUzMxBdjgxQUJ7IpE bWqWm6jocAnAMgJozfBbZ2Mk8n/UPyE= X-Google-Smtp-Source: ABdhPJzntRj1RURHNBG+w5bh5QNuz+K2lAxjTmaqNkqpzdDbiLk0pJ1kpT/TgL5x8BEQ+LSlE6XByQ== X-Received: by 2002:a1c:63c1:: with SMTP id x184mr1039555wmb.138.1601327370370; Mon, 28 Sep 2020 14:09:30 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z15sm2999732wrv.94.2020.09.28.14.09.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:29 -0700 (PDT) Message-Id: <38cef4deb509e5b0c218abcc385232f98ef27863.1601327357.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Junio C Hamano via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:15 +0000 Subject: [PATCH v3 10/11] hashmap_for_each_entry(): workaround MSVC's runtime check failure #3 Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Junio C Hamano Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Junio C Hamano The OFFSETOF_VAR(var, member) macro is implemented in terms of offsetof(typeof(*var), member) with compilers that know typeof(), but its fallback implemenation compares &(var->member) and (var) and count the distance in bytes, i.e. ((uintptr_t)&(var)->member - (uintptr_t)(var)) MSVC's runtime check, when fed an uninitialized 'var', flags this as a use of an uninitialized variable (and that is legit---uninitialized contents of 'var' is subtracted) in a debug build. After auditing all 6 uses of OFFSETOF_VAR(), 1 of them does feed a potentially uninitialized 'var' to the macro in the beginning of the for() loop: #define hashmap_for_each_entry(map, iter, var, member) \ for (var = hashmap_iter_first_entry_offset(map, iter, \ OFFSETOF_VAR(var, member)); \ var; \ var = hashmap_iter_next_entry_offset(iter, \ OFFSETOF_VAR(var, member))) We can work around this by making sure that var has _some_ value when OFFSETOF_VAR() is called. Strictly speaking, it invites undefined behaviour to use NULL here if we end up with pointer comparison, but MSVC runtime seems to be happy with it, and most other systems have typeof() and don't even need pointer comparison fallback code. Signed-off-by: Junio C Hamano Signed-off-by: Johannes Schindelin --- hashmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hashmap.h b/hashmap.h index ef220de4c6..b011b394fe 100644 --- a/hashmap.h +++ b/hashmap.h @@ -449,7 +449,8 @@ static inline struct hashmap_entry *hashmap_iter_first(struct hashmap *map, * containing a @member which is a "struct hashmap_entry" */ #define hashmap_for_each_entry(map, iter, var, member) \ - for (var = hashmap_iter_first_entry_offset(map, iter, \ + for (var = NULL, /* for systems without typeof */ \ + var = hashmap_iter_first_entry_offset(map, iter, \ OFFSETOF_VAR(var, member)); \ var; \ var = hashmap_iter_next_entry_offset(iter, \ From patchwork Mon Sep 28 21:09:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Blain via GitGitGadget X-Patchwork-Id: 11804675 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 535B46CA for ; Mon, 28 Sep 2020 21:09:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B89E2100A for ; Mon, 28 Sep 2020 21:09:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SnYwE+Is" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726931AbgI1VJg (ORCPT ); Mon, 28 Sep 2020 17:09:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726901AbgI1VJe (ORCPT ); Mon, 28 Sep 2020 17:09:34 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D367CC0613D4 for ; Mon, 28 Sep 2020 14:09:32 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id s13so2470223wmh.4 for ; Mon, 28 Sep 2020 14:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:in-reply-to:references:from:date:subject:fcc :content-transfer-encoding:mime-version:to:cc; bh=mROlaAqGuleOiQrwsPI1QWzk+QPq1+bLzH417ff8OEA=; b=SnYwE+IsJpkf7qLDHwYBGgWvjaN5kdjrbAbHGeKMsJo/I6NF2arKlVFXsST8kpaEeu kF7Xoy02HfQfeqpzqQo+Qr+IQH/fiVA+167DYuSupgoCmkB/G7nXxkFEmcRXZ1j+T1Ar AN4h4ugx2NZN6/WYv8D24kQ/3sClGhvbLe8S/PcwS4Ab7rQ7jS9zjyGzX9Jq0tHnCWTP BLA0j59znW/K8+madeszM0/EYzMpnDg/bCPaqVYw4r8STPt391Cg4YV9bYR/pvpWouZb kJFRNX3r+/7/mUoLeGPHKHlCGn2fphdqvd4YOotbT6ULSbkIqhDNgEPGGv4JXDDVFJt5 sjaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:in-reply-to:references:from:date :subject:fcc:content-transfer-encoding:mime-version:to:cc; bh=mROlaAqGuleOiQrwsPI1QWzk+QPq1+bLzH417ff8OEA=; b=E34F1mS0iB3UXgDMQbb/4zjKQdQJeOgOobQ6geqfBq3FLpJNZkySYXqd9YvCQ7iI+o e9IVKd00HzRkLeypC8NF1F2o1yD/YM3x8GbzGK1FZf2Z0oOvebDiO4YbDTDsfoH8rhLq tpTaoEUEUOTNoKNb8srgqxy6DumdaNF0UBiRkHqClJaKhMn6OwxMd8Z/z7j1poa7A69p EYpVWmacIs6LT5tUwa6Md2Pt6cVmRfxYCSrKJwpPiK0MHtjXhXoNNO1yrhR2OaA++dVc H27qOAOS8/yxqJZeRTpuF/KQrMtGIyES/AtcunGCvIJd1Iml0z1j1iSQ3Rl0hnF35Xos UvXA== X-Gm-Message-State: AOAM5319RVtI6yr7bonesAqLh7VTgjhVvSshxdL44UCTFS+C7157zp96 mQr7pEn8rhpvspqf+GJNsMmm6lMw248= X-Google-Smtp-Source: ABdhPJw8JrpcxYPmSEcI6dyTLKFirzYncUDwTRK3/HmIft3tgwlfzkGgyq94jc8SU2AnXLzxk15vRw== X-Received: by 2002:a7b:c76d:: with SMTP id x13mr1036971wmk.10.1601327371337; Mon, 28 Sep 2020 14:09:31 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id l17sm2568415wme.11.2020.09.28.14.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Sep 2020 14:09:30 -0700 (PDT) Message-Id: In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Mon, 28 Sep 2020 21:09:16 +0000 Subject: [PATCH v3 11/11] cmake: fix typo in message when `msgfmt` was not found Fcc: Sent MIME-Version: 1.0 To: git@vger.kernel.org Cc: Sibi Siddharthan , =?utf-8?b?xJBvw6Bu?= =?utf-8?b?IFRy4bqnbiBDw7RuZw==?= Danh , SZEDER =?utf-8?b?R8OhYm9y?= , Eric Sunshine , Johannes Schindelin , =?utf-8?q?=C3=98ystein?= Walle , Johannes Schindelin , Johannes Schindelin Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org From: Johannes Schindelin Signed-off-by: Johannes Schindelin --- contrib/buildsystems/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 4b16744847..b9fced682e 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -166,7 +166,7 @@ find_program(MSGFMT_EXE msgfmt) if(NOT MSGFMT_EXE) set(MSGFMT_EXE ${CMAKE_SOURCE_DIR}/compat/vcbuild/vcpkg/downloads/tools/msys2/msys64/usr/bin/msgfmt.exe) if(NOT EXISTS ${MSGFMT_EXE}) - message(WARNING "Text Translations won't be build") + message(WARNING "Text Translations won't be built") unset(MSGFMT_EXE) endif() endif()