Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cleanup cmake #147

Merged
merged 1 commit into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading