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 4661461 commit d7ab7c7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
name: Linux Reusable Crypto3 Testing
needs:
- handle-syncwith
uses: NilFoundation/crypto3/.github/workflows/reusable-submodule-testing-linux.yml@f945b13ac30e102068e324dbfca6962c0f33ffaf
uses: NilFoundation/crypto3/.github/workflows/reusable-submodule-testing-linux.yml@1bd56b12f410f3f1a4891076705a9261a6b1efaa

secrets: inherit
with:
Expand Down
14 changes: 1 addition & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,14 @@ if(NOT CMAKE_WORKSPACE_NAME OR NOT ("${CMAKE_WORKSPACE_NAME}" STREQUAL "crypto3"
cm_workspace(crypto3)
endif()

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

cm_project(algebra WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME} LANGUAGES ASM C CXX)

if(NOT Boost_FOUND AND NOT CMAKE_CROSSCOMPILING)
cm_find_package(Boost)
find_package(Boost)
endif()

cm_find_package(CM)
include(CMDeploy)

option(BUILD_TESTS "Build unit tests" FALSE)
option(BUILD_BENCH_TESTS "Build performance benchmark tests" FALSE)
option(BUILD_EXAMPLES "Build examples" FALSE)

Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include(CMTest)

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
2 changes: 1 addition & 1 deletion test/bench_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
include(CMTest)

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()

add_custom_target(algebra_runtime_bench_tests)
Expand Down

0 comments on commit d7ab7c7

Please sign in to comment.