From d48e3ba3b3b25f0c73ad4c5f714620bf5bf835c0 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Sun, 12 Nov 2023 13:01:29 +0000 Subject: [PATCH] fixup! cmake: Check system symbols Use the `list(JOIN ...)` command, which is available since CMake 3.12, to covert a `;`-separated list into a string in an idiomatic way. --- cmake/module/CheckSourceCompilesAndLinks.cmake | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmake/module/CheckSourceCompilesAndLinks.cmake b/cmake/module/CheckSourceCompilesAndLinks.cmake index 2e5ab54e67e70..6220b40a1fd1b 100644 --- a/cmake/module/CheckSourceCompilesAndLinks.cmake +++ b/cmake/module/CheckSourceCompilesAndLinks.cmake @@ -1,6 +1,6 @@ -# Copyright (c) 2023 The Bitcoin Core developers +# Copyright (c) 2023-present The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying -# file COPYING or http://www.opensource.org/licenses/mit-license.php. +# file COPYING or https://opensource.org/license/mit/. include(CheckCXXSourceCompiles) include(CMakePushCheckState) @@ -16,14 +16,14 @@ endmacro() macro(check_cxx_source_compiles_with_flags flags source) cmake_push_check_state(RESET) - string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${flags}") + list(JOIN flags " " CMAKE_REQUIRED_FLAGS) check_cxx_source_compiles("${source}" ${ARGN}) cmake_pop_check_state() endmacro() macro(check_cxx_source_links_with_flags flags source) cmake_push_check_state(RESET) - string(REPLACE ";" " " CMAKE_REQUIRED_FLAGS "${flags}") + list(JOIN flags " " CMAKE_REQUIRED_FLAGS) check_cxx_source_links("${source}" ${ARGN}) cmake_pop_check_state() endmacro()