From 7b87a4834a5ae858237eaa87af8f370b2e31f87a Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Thu, 16 Feb 2023 11:12:22 +0000 Subject: [PATCH] cmake: Add `cmake/introspection.cmake` file --- CMakeLists.txt | 2 ++ cmake/bitcoin-config.h.in | 4 ++++ cmake/introspection.cmake | 7 +++++++ 3 files changed, 13 insertions(+) create mode 100644 cmake/introspection.cmake 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)