diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bc8e3b9894af..295e1bb2f6f3a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,8 @@ else() endif() set(CMAKE_POSITION_INDEPENDENT_CODE ON) +include(cmake/introspection.cmake) + add_subdirectory(src) message("\n") diff --git a/cmake/bitcoin-config.h.in b/cmake/bitcoin-config.h.in index 3195c6a526c3d..1f0ff4d17a582 100644 --- a/cmake/bitcoin-config.h.in +++ b/cmake/bitcoin-config.h.in @@ -42,4 +42,8 @@ /* Define to the version of this package. */ #define PACKAGE_VERSION "@PROJECT_VERSION@" +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN 1 + #endif //BITCOIN_CONFIG_H diff --git a/cmake/introspection.cmake b/cmake/introspection.cmake new file mode 100644 index 0000000000000..edb09d22c1fed --- /dev/null +++ b/cmake/introspection.cmake @@ -0,0 +1,7 @@ +# Copyright (c) 2023 The Bitcoin Core developers +# Distributed under the MIT software license, see the accompanying +# file COPYING or http://www.opensource.org/licenses/mit-license.php. + +include(TestBigEndian) + +test_big_endian(WORDS_BIGENDIAN)