Skip to content

Commit

Permalink
Merge pull request ton-blockchain#468 from ton-blockchain/master
Browse files Browse the repository at this point in the history
Merge upstream
  • Loading branch information
EmelyanenkoK authored Sep 21, 2022
2 parents 36e081a + d11580d commit e913871
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,13 @@ find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)

if (TON_ARCH AND NOT MSVC)
CHECK_CXX_COMPILER_FLAG( "-march=${TON_ARCH}" COMPILER_OPT_ARCH_SUPPORTED )
if (TON_ARCH STREQUAL "apple-m1")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcpu=${TON_ARCH}")
else()
elseif(COMPILER_OPT_ARCH_SUPPORTED)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=${TON_ARCH}")
elseif(NOT TON_ARCH STREQUAL "native")
message(FATAL_ERROR "Compiler doesn't support arch ${TON_ARCH}")
endif()
endif()
if (THREADS_HAVE_PTHREAD_ARG)
Expand Down

0 comments on commit e913871

Please sign in to comment.