From 2cfaa0dd3cd75bc348251d860cf4aa8e681ff6f9 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Mon, 27 May 2024 21:08:28 +0200 Subject: [PATCH] remove cm_find_package macro declaration across all modules --- libs/marshalling/algebra/CMakeLists.txt | 9 --------- libs/marshalling/algebra/test/CMakeLists.txt | 2 +- libs/marshalling/multiprecision/CMakeLists.txt | 9 --------- libs/marshalling/multiprecision/test/CMakeLists.txt | 2 +- libs/marshalling/zk/CMakeLists.txt | 9 --------- libs/marshalling/zk/example/CMakeLists.txt | 4 +--- libs/marshalling/zk/test/CMakeLists.txt | 2 +- libs/math/CMakeLists.txt | 10 ---------- libs/math/test/CMakeLists.txt | 2 +- libs/multiprecision/test/CMakeLists.txt | 2 +- libs/pubkey/CMakeLists.txt | 2 +- libs/pubkey/test/CMakeLists.txt | 2 +- 12 files changed, 8 insertions(+), 47 deletions(-) diff --git a/libs/marshalling/algebra/CMakeLists.txt b/libs/marshalling/algebra/CMakeLists.txt index 2151a56e0e..ef72d0219c 100755 --- a/libs/marshalling/algebra/CMakeLists.txt +++ b/libs/marshalling/algebra/CMakeLists.txt @@ -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) diff --git a/libs/marshalling/algebra/test/CMakeLists.txt b/libs/marshalling/algebra/test/CMakeLists.txt index 535fc654b0..c7b56e49a6 100644 --- a/libs/marshalling/algebra/test/CMakeLists.txt +++ b/libs/marshalling/algebra/test/CMakeLists.txt @@ -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} diff --git a/libs/marshalling/multiprecision/CMakeLists.txt b/libs/marshalling/multiprecision/CMakeLists.txt index f2d31ca45b..55dbcf8bd6 100755 --- a/libs/marshalling/multiprecision/CMakeLists.txt +++ b/libs/marshalling/multiprecision/CMakeLists.txt @@ -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) diff --git a/libs/marshalling/multiprecision/test/CMakeLists.txt b/libs/marshalling/multiprecision/test/CMakeLists.txt index bff20ba3a0..5aa75b0d00 100644 --- a/libs/marshalling/multiprecision/test/CMakeLists.txt +++ b/libs/marshalling/multiprecision/test/CMakeLists.txt @@ -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} diff --git a/libs/marshalling/zk/CMakeLists.txt b/libs/marshalling/zk/CMakeLists.txt index c6b29ef195..63afd76461 100755 --- a/libs/marshalling/zk/CMakeLists.txt +++ b/libs/marshalling/zk/CMakeLists.txt @@ -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) diff --git a/libs/marshalling/zk/example/CMakeLists.txt b/libs/marshalling/zk/example/CMakeLists.txt index ca15480d83..deedaf77cc 100644 --- a/libs/marshalling/zk/example/CMakeLists.txt +++ b/libs/marshalling/zk/example/CMakeLists.txt @@ -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) diff --git a/libs/marshalling/zk/test/CMakeLists.txt b/libs/marshalling/zk/test/CMakeLists.txt index c3c6b55ab2..96de741b79 100644 --- a/libs/marshalling/zk/test/CMakeLists.txt +++ b/libs/marshalling/zk/test/CMakeLists.txt @@ -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} diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt index 1ef3c8d028..6e9819a302 100644 --- a/libs/math/CMakeLists.txt +++ b/libs/math/CMakeLists.txt @@ -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) diff --git a/libs/math/test/CMakeLists.txt b/libs/math/test/CMakeLists.txt index edcc6ce669..2c6721bd52 100644 --- a/libs/math/test/CMakeLists.txt +++ b/libs/math/test/CMakeLists.txt @@ -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} diff --git a/libs/multiprecision/test/CMakeLists.txt b/libs/multiprecision/test/CMakeLists.txt index ce79137049..594b2457df 100644 --- a/libs/multiprecision/test/CMakeLists.txt +++ b/libs/multiprecision/test/CMakeLists.txt @@ -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) diff --git a/libs/pubkey/CMakeLists.txt b/libs/pubkey/CMakeLists.txt index 7bd71de2fa..a5f3e359bd 100644 --- a/libs/pubkey/CMakeLists.txt +++ b/libs/pubkey/CMakeLists.txt @@ -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) diff --git a/libs/pubkey/test/CMakeLists.txt b/libs/pubkey/test/CMakeLists.txt index 944f99af08..ceb3186e4e 100644 --- a/libs/pubkey/test/CMakeLists.txt +++ b/libs/pubkey/test/CMakeLists.txt @@ -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)