From patchwork Fri Sep 25 14:28:33 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: 11799893 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 307EE16BC for ; Fri, 25 Sep 2020 14:28:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0C89520BED for ; Fri, 25 Sep 2020 14:28:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QSSjQSuT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728997AbgIYO2u (ORCPT ); Fri, 25 Sep 2020 10:28:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728969AbgIYO2q (ORCPT ); Fri, 25 Sep 2020 10:28:46 -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 B1CC7C0613D3 for ; Fri, 25 Sep 2020 07:28:45 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id a9so3542016wmm.2 for ; Fri, 25 Sep 2020 07:28:45 -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=LbzZ7rratphdzpKCzScQ0H87PZ4mOGWV8pJbumS/i3M=; b=QSSjQSuTZdmNQJ3+Ij6Ulwixb5tI0DU2Od5KnB5N0D2B8P9H8UexigLIgmpcpwI5Tm z+kDAvqzPM4CmqveR98lYHlKpsvxooCTQy/bIskPmn1f1WHnrdU39bKpctMAxf4k9ZEL M8oF5snBysUINTg7iR9QxbgF/aNbLPQC2rw9B40PMllDX5frANJvjdqme6tmN/lg0Ynq AX9JhEtNNgjiLyH09Ru2O/Yk2gMpxpvZZFtFiImf834WeV1cdaT9Jib0ZOXZD6Sqbvcs ScWxicZlAYqdur2s1xO3eeuUav5ejGrPyxeOzlxu4BnGdB1vTzxr4K28IvTGKHnBjuT+ PNuA== 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=LbzZ7rratphdzpKCzScQ0H87PZ4mOGWV8pJbumS/i3M=; b=CpCEviScRKLUXerdyKCsbpAbUdqDR8Tl3aK4QEMzkTg0JhefN94eVcn8/O53s8vOmF nLlvNRHa9rehjrvvGf0h4/xiMVZ3Mv/ziXlL/dkFYz9ixDHWYeXgNj5uTKNLalNEgF1f OOx7A9buQ5qxVBHaso1sMsblpYQ5X6F6PAS7Z0F35CHPQUX2Fok9QfmPmMy6gLXmWkv0 wfBj+x/AUmfJRRPbmbtWqaYq+c/aLflDyVbayost4nqLmhkNsRtShG6Xgszb/ktclyDA 39cH09Dh8WLVrwHOqXoYkX+LviDr7fPlpXOIpyE2vTj9ViaZrIXF9cdfUFEkFicK82gZ VVOw== X-Gm-Message-State: AOAM5339V/sm7RzGQcK52tqBmLq8Rnu5Itv3t8fK7fYIEGlER/cN5uLs B62KLxIP3yHPo7rw6gXYU12+qbCMMlE= X-Google-Smtp-Source: ABdhPJyssYx5fqQcoXycyJwYjJd4EctPWa0Nh2y2LkH7wQ7COhDqK69+Jq/jfCqoWp7nymmG2PJgig== X-Received: by 2002:a1c:770c:: with SMTP id t12mr3679754wmi.121.1601044124288; Fri, 25 Sep 2020 07:28:44 -0700 (PDT) Received: from [127.0.0.1] ([13.74.141.28]) by smtp.gmail.com with ESMTPSA id z127sm3222309wmc.2.2020.09.25.07.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 07:28:43 -0700 (PDT) Message-Id: <8b3500a07c67d07e0928e8d6638d618ab118e1eb.1601044118.git.gitgitgadget@gmail.com> In-Reply-To: References: From: "Johannes Schindelin via GitGitGadget" Date: Fri, 25 Sep 2020 14:28:33 +0000 Subject: [PATCH 05/10] 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?= , 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 acb197fba5..e66ae137c2 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -952,7 +952,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/)