From f21d5ab8394a6256123d6787a8b70c81e9d3a8ba Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 6 Jun 2019 13:50:43 +0200 Subject: [PATCH 1/2] CMake error for big endian systems. --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e8d729f15..5324cf616 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,12 @@ eth_policy() set(PROJECT_VERSION "0.5.10") project(solidity VERSION ${PROJECT_VERSION} LANGUAGES CXX) +include(TestBigEndian) +TEST_BIG_ENDIAN(IS_BIG_ENDIAN) +if (IS_BIG_ENDIAN) + message(FATAL_ERROR "${PROJECT_NAME} currently does not support big endian systems.") +endif() + option(LLL "Build LLL" OFF) option(SOLC_LINK_STATIC "Link solc executable statically on supported platforms" OFF) option(LLLC_LINK_STATIC "Link lllc executable statically on supported platforms" OFF) From 5370af50e3203897162afd5ae76f2c2c86199460 Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Thu, 6 Jun 2019 16:16:02 +0200 Subject: [PATCH 2/2] Attempt to workaround for older cmake versions. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5324cf616..64433978e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,11 @@ eth_policy() set(PROJECT_VERSION "0.5.10") project(solidity VERSION ${PROJECT_VERSION} LANGUAGES CXX) +if (${CMAKE_VERSION} VERSION_LESS "3.9.0") + # needed for the big endian test for older cmake versions + enable_language(C) +endif() + include(TestBigEndian) TEST_BIG_ENDIAN(IS_BIG_ENDIAN) if (IS_BIG_ENDIAN)