From a934ba3079800b157679f743750de4891d1f4b20 Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 15 Dec 2020 22:47:22 +0700 Subject: [PATCH] Fixed Xcode generator. --- CMakeLists.txt | 2 +- cmake/randomx.cmake | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d13ca47..35fba8ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -216,6 +216,6 @@ if (WIN32) add_custom_command(TARGET ${CMAKE_PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_SOURCE_DIR}/scripts/solo_mine_example.cmd" $) endif() -if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release) +if (CMAKE_CXX_COMPILER_ID MATCHES Clang AND CMAKE_BUILD_TYPE STREQUAL Release AND NOT CMAKE_GENERATOR STREQUAL Xcode) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_PROJECT_NAME}) endif() diff --git a/cmake/randomx.cmake b/cmake/randomx.cmake index 9b6f76bc..5d44e05f 100644 --- a/cmake/randomx.cmake +++ b/cmake/randomx.cmake @@ -61,7 +61,11 @@ if (WITH_RANDOMX) src/crypto/randomx/jit_compiler_a64.cpp ) # cheat because cmake and ccache hate each other - set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE C) + if (CMAKE_GENERATOR STREQUAL Xcode) + set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE ASM) + else() + set_property(SOURCE src/crypto/randomx/jit_compiler_a64_static.S PROPERTY LANGUAGE C) + endif() else() list(APPEND SOURCES_CRYPTO src/crypto/randomx/jit_compiler_fallback.cpp