Skip to content

Commit

Permalink
fixup! cmake: Check system symbols
Browse files Browse the repository at this point in the history
Use the `list(JOIN ...)` command, which is available since CMake 3.12,
to covert a `;`-separated list into a string in an idiomatic way.
  • Loading branch information
hebasto committed Nov 12, 2023
1 parent a1542f9 commit d48e3ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmake/module/CheckSourceCompilesAndLinks.cmake
Original file line number Diff line number Diff line change
@@ -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)
Expand All @@ -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()
Expand Down

0 comments on commit d48e3ba

Please sign in to comment.