Skip to content

Commit

Permalink
intx from Hunter PoC
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast authored and axic committed Apr 30, 2019
1 parent acba3a9 commit f585c6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

Expand Down Expand Up @@ -33,7 +36,7 @@ endif()
target_include_directories(hera
PUBLIC $<BUILD_INTERFACE:${hera_include_dir}>$<INSTALL_INTERFACE:include>
)
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")
Expand Down

0 comments on commit f585c6e

Please sign in to comment.