mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
cmake: Fix IF_CHECK_PASSED
option handling
`IF_CHECK_PASSED` is a multi-value keyword, resulting in a list value. Convert it to a string before applying any `string()` command.
This commit is contained in:
parent
65b1941936
commit
97a18c8545
2 changed files with 4 additions and 2 deletions
|
@ -72,7 +72,8 @@ function(try_append_cxx_flags flags)
|
||||||
target_compile_options(${TACXXF_TARGET} INTERFACE ${TACXXF_IF_CHECK_PASSED})
|
target_compile_options(${TACXXF_TARGET} INTERFACE ${TACXXF_IF_CHECK_PASSED})
|
||||||
endif()
|
endif()
|
||||||
if(DEFINED TACXXF_VAR)
|
if(DEFINED TACXXF_VAR)
|
||||||
string(STRIP "${${TACXXF_VAR}} ${TACXXF_IF_CHECK_PASSED}" ${TACXXF_VAR})
|
list(JOIN TACXXF_IF_CHECK_PASSED " " flags_if_check_passed_as_string)
|
||||||
|
string(STRIP "${${TACXXF_VAR}} ${flags_if_check_passed_as_string}" ${TACXXF_VAR})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(DEFINED TACXXF_TARGET)
|
if(DEFINED TACXXF_TARGET)
|
||||||
|
|
|
@ -48,7 +48,8 @@ function(try_append_linker_flag flag)
|
||||||
target_link_options(${TALF_TARGET} INTERFACE ${TALF_IF_CHECK_PASSED})
|
target_link_options(${TALF_TARGET} INTERFACE ${TALF_IF_CHECK_PASSED})
|
||||||
endif()
|
endif()
|
||||||
if(DEFINED TALF_VAR)
|
if(DEFINED TALF_VAR)
|
||||||
string(STRIP "${${TALF_VAR}} ${TALF_IF_CHECK_PASSED}" ${TALF_VAR})
|
list(JOIN TALF_IF_CHECK_PASSED " " flags_if_check_passed_as_string)
|
||||||
|
string(STRIP "${${TALF_VAR}} ${flags_if_check_passed_as_string}" ${TALF_VAR})
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
if(DEFINED TALF_TARGET)
|
if(DEFINED TALF_TARGET)
|
||||||
|
|
Loading…
Add table
Reference in a new issue