Page MenuHomePhabricator

[CMAKE] Fix bitcoind cross build for OSX

Authored by Fabien on May 13 2019, 10:15.



Use CMAKE_<LANG>_FLAGS_INIT (note the _INIT) variables to set the
target. This variable will set the corresponding CMAKE_<LANG>_FLAGS
variable, but is also used to initalize the CMAKE_REQUIRED_FLAGS for
various check_xxx functions such as check_include_file() or
check_symbol_exist(). This fixes the architecture mismatch issue.

Depends on D3031.

Test Plan
mkdir buildcmake && cd buildcmake
cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/OSX.cmake \

The build should succeed.
Check the generated src/bitcoind runs on OSX >= 10.8 (tested on OSX
Sierra 10.12.6).

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

I'm pretty sure the dependency graph for this is completely wrong.

This revision is now accepted and ready to land.May 16 2019, 16:58
This revision was automatically updated to reflect the committed changes.