Skip to content

Commit

Permalink
cleanup cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
MALASHKIN Andrei authored and AndreyMlashkin committed May 21, 2024
1 parent 3304952 commit 0e77dcf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:
jobs:
call-reusable-workflow:
name: Call Reusable Testing Callback Workflow
uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-publish-result.yml@v1.2.0
uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-publish-result.yml@v1.2.1
6 changes: 3 additions & 3 deletions .github/workflows/pull-request-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
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'
secrets: inherit
Expand All @@ -20,7 +20,7 @@ jobs:
name: Linux Reusable Crypto3 Testing
needs:
- handle-syncwith
uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-testing-linux.yml@v1.2.0
uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-testing-linux.yml@v1.2.1

secrets: inherit
with:
Expand All @@ -33,7 +33,7 @@ jobs:
# name: Mac Reusable Crypto3 Testing
# needs:
# - handle-syncwith
# uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-testing-mac.yml@v1.2.0
# uses: NilFoundation/ci-cd/.github/workflows/reusable-crypto3-testing-mac.yml@v1.2.1
#
# secrets: inherit
# with:
Expand Down
16 changes: 2 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,13 @@ include(CMDeploy)
include(CMSetupVersion)

cm_workspace(marshalling)

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

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

cm_find_package(CM)
include(CMDeploy)
include(FindPkgConfig)

include(CMSetupVersion)

option(BUILD_TESTS "Build unit tests" TRUE)
option(BUILD_WITH_NO_WARNINGS "Build threading warnings as errors" FALSE)

cm_setup_version(VERSION 0.1.0 PREFIX ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME})
Expand Down Expand Up @@ -64,9 +53,8 @@ cm_deploy(TARGETS ${CMAKE_WORKSPACE_NAME}_${CURRENT_PROJECT_NAME}
INCLUDE include
NAMESPACE ${CMAKE_WORKSPACE_NAME}::)

if(BUILD_TESTS)
add_subdirectory(test)
endif()
include(CMTest)
cm_add_test_subdirectory(test)

if(BUILD_EXAMPLES)
add_subdirectory(example)
Expand Down
2 changes: 1 addition & 1 deletion example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include(CMDeploy)
include(CMSetupVersion)


cm_find_package(Boost REQUIRED COMPONENTS filesystem log log_setup program_options thread system)
find_package(Boost REQUIRED COMPONENTS filesystem log log_setup program_options thread system)


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

if(NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
cm_find_package(Boost REQUIRED COMPONENTS unit_test_framework filesystem log log_setup program_options thread system)
find_package(Boost REQUIRED COMPONENTS unit_test_framework filesystem log log_setup program_options thread system)
endif()

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

0 comments on commit 0e77dcf

Please sign in to comment.