forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: Port changes from PR28981 #154
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,54 +55,4 @@ function(add_boost_if_needed) | |
endif() | ||
endif() | ||
|
||
if(WITH_EXTERNAL_SIGNER) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good to get rid of this |
||
include(CheckCXXSourceCompiles) | ||
set(CMAKE_REQUIRED_INCLUDES ${Boost_INCLUDE_DIR}) | ||
# Boost 1.78 requires the following workaround. | ||
# See: https://github.com/boostorg/process/issues/235 | ||
set(CMAKE_REQUIRED_FLAGS "-Wno-error=narrowing") | ||
# Boost 1.73 requires the following workaround on systems with | ||
# libc<2.34 only, as newer libc has integrated the functionality | ||
# of the libpthread library. | ||
set(CMAKE_REQUIRED_LIBRARIES Threads::Threads) | ||
check_cxx_source_compiles(" | ||
#define BOOST_PROCESS_USE_STD_FS | ||
#include <boost/process.hpp> | ||
#include <string> | ||
|
||
int main() | ||
{ | ||
namespace bp = boost::process; | ||
bp::opstream stdin_stream; | ||
bp::ipstream stdout_stream; | ||
bp::child c(\"dummy\", bp::std_out > stdout_stream, bp::std_err > stdout_stream, bp::std_in < stdin_stream); | ||
stdin_stream << std::string{\"test\"} << std::endl; | ||
if (c.running()) c.terminate(); | ||
c.wait(); | ||
c.exit_code(); | ||
} | ||
" HAVE_BOOST_PROCESS | ||
) | ||
if(HAVE_BOOST_PROCESS) | ||
if(WIN32) | ||
# Boost Process for Windows uses Boost ASIO. Boost ASIO performs | ||
# pre-main init of Windows networking libraries, which we do not | ||
# want. | ||
set(WITH_EXTERNAL_SIGNER OFF PARENT_SCOPE) | ||
set(ENABLE_EXTERNAL_SIGNER OFF PARENT_SCOPE) | ||
else() | ||
set(WITH_EXTERNAL_SIGNER ON PARENT_SCOPE) | ||
set(ENABLE_EXTERNAL_SIGNER ON PARENT_SCOPE) | ||
target_compile_definitions(Boost::headers INTERFACE | ||
BOOST_PROCESS_USE_STD_FS | ||
) | ||
endif() | ||
elseif(WITH_EXTERNAL_SIGNER STREQUAL "AUTO") | ||
set(WITH_EXTERNAL_SIGNER OFF PARENT_SCOPE) | ||
set(ENABLE_EXTERNAL_SIGNER OFF PARENT_SCOPE) | ||
else() | ||
message(FATAL_ERROR "External signing is not supported for this Boost version.") | ||
endif() | ||
endif() | ||
|
||
endfunction() |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this
set
? Is it just because the option name and the internal name are different?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. See:
bitcoin/cmake/bitcoin-config.h.in
Lines 145 to 146 in b8fd285
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!