SelectAssemblyFiles.cmake 741 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# Tries to locate the correct CS_FAST_ASSEMBLY files for this platform and
# sets CS_CSCONTEXT_FOUND to true if the platform is supported.
#
# To add a platform add a clause locating the correct assembly implementations for the system.

SET(CS_CSCONTEXT_FOUND TRUE)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
    # Typical Linux running on x86_64
    SET(CS_CSCONTEXT_ASSEMBLY
            asm/cscontext/enter_context_x86_64_sysv_elf.s
            asm/cscontext/switch_context_x86_64_sysv_elf.s)
else ()
    SET(CS_CSCONTEXT_FOUND FALSE)
endif ()

if (CS_CSCONTEXT_FOUND)
    MESSAGE("-- CS_CSCONTEXT_FOUND: ${CS_CSCONTEXT_ASSEMBLY}")
else ()
    MESSAGE("-- CS_CSCONTEXT_FOUND: NOT FOUND")
endif ()