rig/cmake/asm.cmake

25 lines
857 B
CMake
Raw Normal View History

2018-09-24 14:57:30 +03:00
if (WITH_ASM AND NOT XMRIG_ARM AND CMAKE_SIZEOF_VOID_P EQUAL 8)
2018-09-23 20:16:33 +03:00
set(XMRIG_ASM_LIBRARY "xmrig-asm")
if (CMAKE_CXX_COMPILER_ID MATCHES MSVC)
enable_language(ASM_MASM)
set_property(SOURCE "src/crypto/asm/cnv2_main_loop.asm" PROPERTY ASM_MASM)
add_library(${XMRIG_ASM_LIBRARY} STATIC
"src/crypto/asm/cnv2_main_loop.asm"
)
else()
enable_language(ASM)
set_property(SOURCE "src/crypto/asm/cnv2_main_loop.S" PROPERTY C)
add_library(${XMRIG_ASM_LIBRARY} STATIC
"src/crypto/asm/cnv2_main_loop.S"
)
endif()
2018-09-24 14:19:26 +03:00
set(XMRIG_ASM_SOURCES src/crypto/Asm.h src/crypto/Asm.cpp)
2018-09-23 20:16:33 +03:00
set_property(TARGET ${XMRIG_ASM_LIBRARY} PROPERTY LINKER_LANGUAGE C)
else()
2018-09-24 14:19:26 +03:00
set(XMRIG_ASM_SOURCES "")
2018-09-23 20:16:33 +03:00
set(XMRIG_ASM_LIBRARY "")
add_definitions(/DXMRIG_NO_ASM)
endif()