Skip to content

Commit

Permalink
remove cm_find_package macro declaration across all modules
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed May 29, 2024
1 parent 19e3323 commit 2cfaa0d
Show file tree
Hide file tree
Showing 12 changed files with 8 additions and 47 deletions.
9 changes: 0 additions & 9 deletions libs/marshalling/algebra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ 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_algebra WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME} LANGUAGES C CXX)

cm_find_package(CM)
Expand Down
2 changes: 1 addition & 1 deletion libs/marshalling/algebra/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
9 changes: 0 additions & 9 deletions libs/marshalling/multiprecision/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ 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_multiprecision WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME} LANGUAGES C CXX)

cm_find_package(CM)
Expand Down
2 changes: 1 addition & 1 deletion libs/marshalling/multiprecision/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
9 changes: 0 additions & 9 deletions libs/marshalling/zk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,6 @@ 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)
Expand Down
4 changes: 1 addition & 3 deletions libs/marshalling/zk/example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ cm_find_package(CM)
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)
add_executable(marshalling_${name}_example ${name}.cpp)
Expand Down
2 changes: 1 addition & 1 deletion libs/marshalling/zk/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
10 changes: 0 additions & 10 deletions libs/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,6 @@ 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(math WORKSPACE_NAME ${CMAKE_WORKSPACE_NAME} LANGUAGES ASM C CXX)

cm_find_package(CM)
Expand Down
2 changes: 1 addition & 1 deletion libs/math/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 libs/multiprecision/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# http://www.boost.org/LICENSE_1_0.txt
#---------------------------------------------------------------------------#

cm_find_package(Eigen3)
find_package(Eigen3)

#add_custom_target(${CURRENT_PROJECT_NAME}_test_suite_arithmetic_tests)
#add_custom_target(${CURRENT_PROJECT_NAME}_test_suite_functions_and_limits)
Expand Down
2 changes: 1 addition & 1 deletion libs/pubkey/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include(CMDeploy)
include(CMSetupVersion)

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

option(BUILD_TESTS "Build unit tests" FALSE)
Expand Down
2 changes: 1 addition & 1 deletion libs/pubkey/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,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_find_package(${CMAKE_WORKSPACE_NAME}_marshalling)
Expand Down

0 comments on commit 2cfaa0d

Please sign in to comment.