Skip to content

Commit

Permalink
cleanup cmake; update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MALASHKIN Andrei authored and AndreyMlashkin committed May 22, 2024
1 parent 9ff953d commit 3288e07
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ concurrency:
jobs:
handle-syncwith:
name: Call Reusable SyncWith Handler
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1.2.0
uses: NilFoundation/ci-cd/.github/workflows/reusable-handle-syncwith.yml@v1.2.1
with:
ci-cd-ref: 'v1.2.0'
ci-cd-ref: 'v1.2.1'
secrets: inherit

test-linux:
name: Linux Reusable Crypto3 Testing
needs:
- handle-syncwith
uses: NilFoundation/crypto3/.github/workflows/reusable-submodule-testing-linux.yml@14b2aac2501c57fd1ee8174cc43cfbfc87b40ecc
uses: NilFoundation/crypto3/.github/workflows/reusable-submodule-testing-linux.yml@1bd56b12f410f3f1a4891076705a9261a6b1efaa

secrets: inherit
with:
Expand Down
15 changes: 3 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,8 @@ endif()

cm_project(hash WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME} LANGUAGES C CXX)

macro(cm_find_package NAME)
if(NOT "${NAME}" MATCHES "^${CMAKE_WORKSPACE_NAME}_.*$" AND NOT "${NAME}" STREQUAL CM)
find_package(${ARGV})
else()
set(${ARGV0}_FOUND ON CACHE BOOL "")
endif()
endmacro()

if(NOT Boost_FOUND AND NOT CMAKE_CROSSCOMPILING)
cm_find_package(Boost COMPONENTS REQUIRED container)
find_package(Boost COMPONENTS REQUIRED container)
endif()

include(TargetArchitecture)
Expand All @@ -47,8 +39,8 @@ include(PlatformConfiguration)

include(CheckSSE)
include(CheckAVX)

option(BUILD_TESTS "Build unit tests" FALSE)
include(CMTest)
cm_add_test_subdirectory(test)

option(CRYPTO3_HASH_BLAKE2B "Build with Blake2 hash support" TRUE)
option(CRYPTO3_HASH_CHECKSUM_ADLER "Build with Adler checksum support" TRUE)
Expand Down Expand Up @@ -279,4 +271,3 @@ elseif(${CMAKE_TARGET_ARCHITECTURE} STREQUAL "ppc64")
"${CMAKE_UPPER_WORKSPACE_NAME}_HAS_POWER8")
endif()

cm_add_test_subdirectory(test)
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ include(CMTest)
cm_find_package(${CMAKE_WORKSPACE_NAME}_block)

if(NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
cm_find_package(Boost REQUIRED COMPONENTS unit_test_framework)
find_package(Boost REQUIRED COMPONENTS unit_test_framework)
endif()

cm_test_link_libraries(${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME}
Expand Down

0 comments on commit 3288e07

Please sign in to comment.