From f585c6ee178bc08fe17dd3232afd6b08be812e34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Fri, 26 Apr 2019 19:09:17 +0200 Subject: [PATCH] intx from Hunter PoC --- CMakeLists.txt | 11 ++++++----- src/CMakeLists.txt | 5 ++++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b313e0dc..9557a37ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,11 +12,12 @@ include(CableToolchains) include(CMakePackageConfigHelpers) include(GNUInstallDirs) -if(EVMC_TESTING OR EVMC_TEST_TOOLS) - # If Hunter is needed it must be initialized before project(hera). - include(evmc/cmake/cable/HunterGate.cmake) - include(evmc/cmake/HunterConfig.cmake) -endif() +include(evmc/cmake/cable/HunterGate.cmake) + +HunterGate( + URL "https://github.com/chfast/hunter/archive/afa1e3f1bba64de50692d96ff5ce1805bbefa171.tar.gz" + SHA1 "0550019a38e10c22530e618d89c9a7f22b95143a" +) cable_configure_toolchain(DEFAULT cxx17-pic) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 48fd5594f..f558e2eae 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,8 @@ find_package(Threads REQUIRED) +hunter_add_package(intx) +find_package(intx CONFIG REQUIRED) + set(hera_include_dir ${PROJECT_SOURCE_DIR}/include) get_filename_component(evmc_include_dir .. ABSOLUTE) @@ -33,7 +36,7 @@ endif() target_include_directories(hera PUBLIC $$ ) -target_link_libraries(hera PUBLIC evmc::evmc PRIVATE hera-buildinfo evmc::instructions) +target_link_libraries(hera PUBLIC evmc::evmc PRIVATE hera-buildinfo evmc::instructions intx::intx) if(NOT WIN32) if(CMAKE_COMPILER_IS_GNUCXX) set_target_properties(hera PROPERTIES LINK_FLAGS "-Wl,--no-undefined")