Skip to content

Commit

Permalink
Merge pull request #231 from chfast/hunter
Browse files Browse the repository at this point in the history
cmake: Disable Hunter by default
  • Loading branch information
chfast authored Apr 3, 2023
2 parents 02b3417 + 8ce526a commit 8707075
Show file tree
Hide file tree
Showing 37 changed files with 17 additions and 1,006 deletions.
25 changes: 9 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
# Copyright 2018 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.

cmake_minimum_required(VERSION 3.16.2)
cmake_minimum_required(VERSION 3.16.2...3.25)

include(cmake/cable/bootstrap.cmake)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

include(CableBuildType)
include(CableCompilerSettings)
include(CableToolchains)
include(CMakeDependentOption)
include(CMakePackageConfigHelpers)
include(HunterGate)

cable_configure_toolchain(DEFAULT cxx14)
cable_set_build_type(DEFAULT Release CONFIGURATION_TYPES Release RelWithDebInfo Debug)
option(ETHASH_INSTALL_CMAKE_CONFIG "Install CMake configuration scripts for find_package(CONFIG)" ON)
option(ETHASH_BUILD_ETHASH "Build ethash::ethash library (if NO only ethash::keccak is built)" YES)
cmake_dependent_option(ETHASH_BUILD_GLOBAL_CONTEXT "Build ethash::global-context library" YES "ETHASH_BUILD_ETHASH" NO)
option(ETHASH_TESTING "Build unit tests" NO)

include(cmake/Hunter/init.cmake)
if(ETHASH_TESTING)
include(cmake/Hunter/init.cmake)
endif()

project(ethash)
set(PROJECT_VERSION 1.0.0)
Expand Down Expand Up @@ -62,16 +63,8 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES GNU)
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
endif()

option(ETHASH_INSTALL_CMAKE_CONFIG "Install CMake configuration scripts for find_package(CONFIG)" ON)

set(include_dir ${PROJECT_SOURCE_DIR}/include)

option(ETHASH_BUILD_ETHASH "Build ethash::ethash library (if NO only ethash::keccak is built)" YES)

cmake_dependent_option(ETHASH_BUILD_GLOBAL_CONTEXT "Build ethash::global-context library" YES "ETHASH_BUILD_ETHASH" NO)

option(ETHASH_TESTING "Build unit tests" NO)

add_subdirectory(lib)

if(ETHASH_TESTING)
Expand Down
8 changes: 1 addition & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,9 @@ configuration:
- Release
environment:
ARCH: amd64
TOOLCHAIN: cxx11
HUNTER_CACHE_TOKEN:
secure: agYfiC1OKfHnGOJQolOBorIRovVTgDW3TJ8JOb2+0XZiAnNwbrtPegxaaFM8/VWu
matrix:
- VS: 2019
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- VS: 2019
TOOLCHAIN: cxx17
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- VS: 2019
CC: clang-cl
CXX: clang-cl
Expand All @@ -37,7 +31,7 @@ install:

before_build:
- call "%ProgramFiles(x86)%\Microsoft Visual Studio\%VS%\Community\Common7\Tools\vsdevcmd" -arch=%ARCH%
- cmake -S . -B build -G Ninja -Wno-dev -DTOOLCHAIN=%TOOLCHAIN% -DCMAKE_INSTALL_PREFIX=./dist -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DETHASH_TESTING=ON -DHUNTER_CONFIGURATION_TYPES=%CONFIGURATION%
- cmake -S . -B build -G Ninja -Wno-dev -DCMAKE_INSTALL_PREFIX=./dist -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DETHASH_TESTING=ON -DHUNTER_CONFIGURATION_TYPES=%CONFIGURATION%

build_script:
- cmake --build build --target install
Expand Down
30 changes: 4 additions & 26 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ commands:
$CXX --version
cmake --version
install-mips64:
steps:
- run:
name: "Install mips64 toolchain"
command: |
sudo apt -q update
sudo apt -qy install g++-mips64-linux-gnuabi64 qemu-user-static
install-powerpc64:
steps:
- run:
Expand Down Expand Up @@ -170,7 +162,7 @@ jobs:
- image: ethereum/cpp-build-env:19-gcc-12-multilib
environment:
- BUILD_TYPE: RelWithDebInfo
- CMAKE_OPTIONS: -DTOOLCHAIN=cxx11-32bit -DSANITIZE=address
- CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/32bit.cmake -DSANITIZE=address
- TESTS_EXCLUDE: _oom
- ASAN_OPTIONS: allocator_may_return_null=1
steps:
Expand All @@ -179,26 +171,13 @@ jobs:
- build
- test

mips64:
docker:
- image: ethereum/cpp-build-env:19-gcc-12
environment:
- TESTS_EXCLUDE: _oom|_multithreaded
- CMAKE_OPTIONS: -DTOOLCHAIN=mips64 -DCMAKE_EXE_LINKER_FLAGS=-static
steps:
- checkout
- install-mips64
- configure
- build-tests
- test

powerpc64:
docker:
- image: ethereum/cpp-build-env:19-gcc-12
environment:
- TESTS_EXCLUDE: _oom|_multithreaded
- BUILD_TYPE: Coverage
- CMAKE_OPTIONS: -DTOOLCHAIN=powerpc64 -DCMAKE_EXE_LINKER_FLAGS=-static
- CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/powerpc64.cmake -DCMAKE_EXE_LINKER_FLAGS=-static
steps:
- checkout
- install-powerpc64
Expand All @@ -216,7 +195,7 @@ jobs:
docker:
- image: ethereum/cpp-build-env:16-clang-11
environment:
- CMAKE_OPTIONS: -DETHASH_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DHUNTER_ENABLED=OFF
- CMAKE_OPTIONS: -DETHASH_TESTING=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON
steps:
- checkout
- configure
Expand Down Expand Up @@ -317,7 +296,7 @@ jobs:
docker:
- image: ethereum/cpp-build-env:17-gcc-10
environment:
CMAKE_OPTIONS: -DHUNTER_RUN_UPLOAD=FALSE -DTOOLCHAIN=wasm32-wasi -DETHASH_TESTING=NO -DETHASH_BUILD_GLOBAL_CONTEXT=NO
CMAKE_OPTIONS: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/wasm32-wasi.cmake -DETHASH_TESTING=NO -DETHASH_BUILD_GLOBAL_CONTEXT=NO
steps:
- run:
name: "Install WASI SDK"
Expand All @@ -338,7 +317,6 @@ workflows:
- linux-gcc-coverage
- linux-clang-sanitizers
- linux-32bit-asan
# - mips64 toolchain is broken on recent Debian
- powerpc64
- macos-xcode-tsan
- macos-xcode-old
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion cmake/cable/.gitignore

This file was deleted.

98 changes: 0 additions & 98 deletions cmake/cable/CableBuildInfo.cmake

This file was deleted.

44 changes: 0 additions & 44 deletions cmake/cable/CableBuildType.cmake

This file was deleted.

36 changes: 0 additions & 36 deletions cmake/cable/CablePackage.cmake

This file was deleted.

31 changes: 0 additions & 31 deletions cmake/cable/CableToolchains.cmake

This file was deleted.

Loading

0 comments on commit 8707075

Please sign in to comment.