From 7d4c9b4324e7c2a7f2f8ad7fb1734dbe74daafa3 Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Wed, 11 Dec 2024 09:48:13 +0100 Subject: [PATCH 1/2] remove cmake lines, that are overridden by nix configure --- crypto3/cmake/CheckSSE.cmake | 57 ------------------- evm-assigner/cmake/cable/cable.cmake | 2 - .../cmake/cable/toolchains/mips64.cmake | 1 - .../cmake/cable/toolchains/powerpc64.cmake | 1 - evm-assigner/cmake/toolchains/riscv32.cmake | 2 - 5 files changed, 63 deletions(-) mode change 100755 => 100644 evm-assigner/cmake/cable/cable.cmake diff --git a/crypto3/cmake/CheckSSE.cmake b/crypto3/cmake/CheckSSE.cmake index 562b6b17fa..f915edeaac 100644 --- a/crypto3/cmake/CheckSSE.cmake +++ b/crypto3/cmake/CheckSSE.cmake @@ -58,63 +58,6 @@ macro(check_sse) set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") endif(SSE42_TRUE) - elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") - execute_process(COMMAND "/usr/bin/env -S sysctl -n machdep.cpu.features" OUTPUT_VARIABLE - CPUINFO) - - string(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE "${CPUINFO}") - string(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE) - if(SSE2_TRUE) - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - else(SSE2_TRUE) - set(SSE2_FOUND false CACHE BOOL "SSE2 available on host") - endif(SSE2_TRUE) - - string(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" SSE_THERE "${CPUINFO}") - string(COMPARE EQUAL "SSE3" "${SSE_THERE}" SSE3_TRUE) - if(SSE3_TRUE) - set(SSE3_FOUND true CACHE BOOL "SSE3 available on host") - else(SSE3_TRUE) - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - endif(SSE3_TRUE) - - string(REGEX REPLACE "^.*(SSSE3).*$" "\\1" SSE_THERE "${CPUINFO}") - string(COMPARE EQUAL "SSSE3" "${SSE_THERE}" SSSE3_TRUE) - if(SSSE3_TRUE) - set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host") - else(SSSE3_TRUE) - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - endif(SSSE3_TRUE) - - string(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" SSE_THERE "${CPUINFO}") - string(COMPARE EQUAL "SSE4.1" "${SSE_THERE}" SSE41_TRUE) - if(SSE41_TRUE) - set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host") - else(SSE41_TRUE) - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - endif(SSE41_TRUE) - - string(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" SSE_THERE "${CPUINFO}") - string(COMPARE EQUAL "SSE4.2" "${SSE_THERE}" SSE42_TRUE) - if(SSE42_TRUE) - set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host") - else(SSE42_TRUE) - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") - endif(SSE42_TRUE) - - elseif(CMAKE_SYSTEM_NAME MATCHES "Windows") - # TODO - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") - else(CMAKE_SYSTEM_NAME MATCHES "Linux") - set(SSE2_FOUND true CACHE BOOL "SSE2 available on host") - set(SSE3_FOUND false CACHE BOOL "SSE3 available on host") - set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host") - set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host") - set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host") endif(CMAKE_SYSTEM_NAME MATCHES "Linux") if(CMAKE_COMPILER_IS_GNUCXX) diff --git a/evm-assigner/cmake/cable/cable.cmake b/evm-assigner/cmake/cable/cable.cmake old mode 100755 new mode 100644 index 0b85522d45..20d2239a88 --- a/evm-assigner/cmake/cable/cable.cmake +++ b/evm-assigner/cmake/cable/cable.cmake @@ -1,5 +1,3 @@ -#!/usr/bin/env -S cmake -P - # Cable: CMake Bootstrap Library # Copyright 2019-2020 Pawel Bylica. # Licensed under the Apache License, Version 2.0. diff --git a/evm-assigner/cmake/cable/toolchains/mips64.cmake b/evm-assigner/cmake/cable/toolchains/mips64.cmake index e90d748fb6..fe6aaeddef 100644 --- a/evm-assigner/cmake/cable/toolchains/mips64.cmake +++ b/evm-assigner/cmake/cable/toolchains/mips64.cmake @@ -7,7 +7,6 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_C_COMPILER mips64-linux-gnuabi64-gcc) set(CMAKE_CXX_COMPILER mips64-linux-gnuabi64-g++) -set(CMAKE_FIND_ROOT_PATH /usr/mips64-linux-gnuabi64) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/evm-assigner/cmake/cable/toolchains/powerpc64.cmake b/evm-assigner/cmake/cable/toolchains/powerpc64.cmake index e6c7e7fce6..0cc7417ed3 100644 --- a/evm-assigner/cmake/cable/toolchains/powerpc64.cmake +++ b/evm-assigner/cmake/cable/toolchains/powerpc64.cmake @@ -7,7 +7,6 @@ set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc) set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++) -set(CMAKE_FIND_ROOT_PATH /usr/powerpc64-linux-gnu) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) diff --git a/evm-assigner/cmake/toolchains/riscv32.cmake b/evm-assigner/cmake/toolchains/riscv32.cmake index 5fa0f754a5..1ca520b76f 100644 --- a/evm-assigner/cmake/toolchains/riscv32.cmake +++ b/evm-assigner/cmake/toolchains/riscv32.cmake @@ -2,8 +2,6 @@ # Copyright 2023 Pawel Bylica. # Licensed under the Apache License, Version 2.0. See the LICENSE file. -set(RISCV /usr/local/riscv) - set(CMAKE_SYSTEM_PROCESSOR riscv32) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_C_COMPILER ${RISCV}/bin/clang) From 29769b4549b763acf03dc58b7627cee539fd053c Mon Sep 17 00:00:00 2001 From: Andrei Malashkin Date: Wed, 11 Dec 2024 09:48:40 +0100 Subject: [PATCH 2/2] fix cmake warning --- crypto3/libs/multiprecision/test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto3/libs/multiprecision/test/CMakeLists.txt b/crypto3/libs/multiprecision/test/CMakeLists.txt index 8aba8a96ca..6aaeb9cbf2 100644 --- a/crypto3/libs/multiprecision/test/CMakeLists.txt +++ b/crypto3/libs/multiprecision/test/CMakeLists.txt @@ -57,7 +57,7 @@ macro(define_big_int_test name) # target_link_libraries(${test_name} no_eh_support) add_dependencies(${CURRENT_PROJECT_NAME}_test_suite_big_int_tests ${test_name}) -endmacro(define_big_uint_test) +endmacro(define_big_int_test) set(RUNTIME_TESTS_NAMES "inverse"