mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-19 20:25:18 +01:00
Merge bitcoin/bitcoin#30803: build: Minor build system fixes and amendments
1cc93fe7b4build: Delete dead code that implements `IF_CHECK_FAILED` option (Hennadii Stepanov)341ad23809build: Delete MSVC special case for `BUILD_FOR_FUZZING` option (Hennadii Stepanov)fdad128b52build: Stop enabling CMake's CMP0141 policy (Hennadii Stepanov)b2a6f545b4doc: Drop `ctest` command from Windows cross-compiling instructions (Hennadii Stepanov)73b618582dbuild: Print `CMAKE_CXX_COMPILER_ARG1` in summary (Hennadii Stepanov)f03c942095build, test: Add missed log options (Hennadii Stepanov)6f2cb0eafddoc: Amend comment about ZeroMQ config files (Hennadii Stepanov) Pull request description: This PR addresses the following comments: - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1742342524 - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1728692369 - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1736110362 - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1742931121 - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1747723657 - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1742328675 - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1723106474 ACKs for top commit: sipsorcery: tACK1cc93fe7b4(win11 msvc). maflcko: re-ACK1cc93fe7b4Tree-SHA512: a390797bb4d3b7eb9163653b6c9c324e7a01090f6cdda74df7349a24a5c4a2084e5912878747f56561315afc70cae9adb1c363f47ceb0af96004ea591d25171b
This commit is contained in:
@@ -22,7 +22,8 @@ function(print_flags_per_config config indent_num)
|
||||
get_target_interface(definitions "${config}" core_interface COMPILE_DEFINITIONS)
|
||||
indent_message("Preprocessor defined macros ..........." "${definitions}" ${indent_num})
|
||||
|
||||
string(STRIP "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${config_uppercase}}" combined_cxx_flags)
|
||||
string(STRIP "${CMAKE_CXX_COMPILER_ARG1} ${CMAKE_CXX_FLAGS}" combined_cxx_flags)
|
||||
string(STRIP "${combined_cxx_flags} ${CMAKE_CXX_FLAGS_${config_uppercase}}" combined_cxx_flags)
|
||||
string(STRIP "${combined_cxx_flags} ${CMAKE_CXX${CMAKE_CXX_STANDARD}_STANDARD_COMPILE_OPTION}" combined_cxx_flags)
|
||||
if(CMAKE_POSITION_INDEPENDENT_CODE)
|
||||
string(JOIN " " combined_cxx_flags ${combined_cxx_flags} ${CMAKE_CXX_COMPILE_OPTIONS_PIC})
|
||||
|
||||
@@ -32,12 +32,6 @@ Usage examples:
|
||||
)
|
||||
|
||||
|
||||
try_append_cxx_flags("-Werror=return-type" TARGET core_interface
|
||||
IF_CHECK_FAILED "-Wno-error=return-type"
|
||||
SOURCE "#include <cassert>\nint f(){ assert(false); }"
|
||||
)
|
||||
|
||||
|
||||
In configuration output, this function prints a string by the following pattern:
|
||||
|
||||
-- Performing Test CXX_SUPPORTS_[flags]
|
||||
@@ -49,7 +43,7 @@ function(try_append_cxx_flags flags)
|
||||
TACXXF # prefix
|
||||
"SKIP_LINK" # options
|
||||
"TARGET;VAR;SOURCE;RESULT_VAR" # one_value_keywords
|
||||
"IF_CHECK_PASSED;IF_CHECK_FAILED" # multi_value_keywords
|
||||
"IF_CHECK_PASSED" # multi_value_keywords
|
||||
)
|
||||
|
||||
set(flags_as_string "${flags}")
|
||||
@@ -88,13 +82,6 @@ function(try_append_cxx_flags flags)
|
||||
string(STRIP "${${TACXXF_VAR}} ${flags_as_string}" ${TACXXF_VAR})
|
||||
endif()
|
||||
endif()
|
||||
elseif(DEFINED TACXXF_IF_CHECK_FAILED)
|
||||
if(DEFINED TACXXF_TARGET)
|
||||
target_compile_options(${TACXXF_TARGET} INTERFACE ${TACXXF_IF_CHECK_FAILED})
|
||||
endif()
|
||||
if(DEFINED TACXXF_VAR)
|
||||
string(STRIP "${${TACXXF_VAR}} ${TACXXF_IF_CHECK_FAILED}" ${TACXXF_VAR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED TACXXF_VAR)
|
||||
|
||||
@@ -22,7 +22,7 @@ function(try_append_linker_flag flag)
|
||||
TALF # prefix
|
||||
"" # options
|
||||
"TARGET;VAR;SOURCE;RESULT_VAR" # one_value_keywords
|
||||
"IF_CHECK_PASSED;IF_CHECK_FAILED" # multi_value_keywords
|
||||
"IF_CHECK_PASSED" # multi_value_keywords
|
||||
)
|
||||
|
||||
string(MAKE_C_IDENTIFIER "${flag}" result)
|
||||
@@ -58,13 +58,6 @@ function(try_append_linker_flag flag)
|
||||
string(STRIP "${${TALF_VAR}} ${flag}" ${TALF_VAR})
|
||||
endif()
|
||||
endif()
|
||||
elseif(DEFINED TALF_IF_CHECK_FAILED)
|
||||
if(DEFINED TALF_TARGET)
|
||||
target_link_options(${TALF_TARGET} INTERFACE ${TACXXF_IF_CHECK_FAILED})
|
||||
endif()
|
||||
if(DEFINED TALF_VAR)
|
||||
string(STRIP "${${TALF_VAR}} ${TACXXF_IF_CHECK_FAILED}" ${TALF_VAR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(DEFINED TALF_VAR)
|
||||
|
||||
Reference in New Issue
Block a user