cmake: only compile X86ATTInstPrinter.c in non-diet mode
This commit is contained in:
parent
b67e030497
commit
a71a27b87f
|
@ -1,24 +1,29 @@
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
project(capstone)
|
project(capstone)
|
||||||
|
|
||||||
set(VERSION_MAJOR 2)
|
# Compile-time options
|
||||||
set(VERSION_MINOR 1)
|
# Modify the following options to customize Capstone engine
|
||||||
set(VERSION_PATCH 2)
|
|
||||||
|
|
||||||
option(BUILD_STATIC "Build static library" ON)
|
option(BUILD_STATIC "Build static library" ON)
|
||||||
|
|
||||||
option(BUILD_DIET "Build diet library" OFF)
|
option(BUILD_DIET "Build diet library" OFF)
|
||||||
option(BUILD_TESTS "Build tests" ON)
|
option(BUILD_TESTS "Build tests" ON)
|
||||||
option(USE_DEFAULT_ALLOC "Use default memory allocation functions" ON)
|
option(USE_DEFAULT_ALLOC "Use default memory allocation functions" ON)
|
||||||
|
|
||||||
option(ARM_SUPPORT "ARM support" ON)
|
option(ARM_SUPPORT "ARM support" ON)
|
||||||
option(ARM64_SUPPORT "ARM64 support" ON)
|
option(ARM64_SUPPORT "ARM64 support" ON)
|
||||||
option(MIPS_SUPPORT "MIPS support" ON)
|
option(MIPS_SUPPORT "MIPS support" ON)
|
||||||
option(PPC_SUPPORT "PowerPC support" ON)
|
option(PPC_SUPPORT "PowerPC support" ON)
|
||||||
option(X86_SUPPORT "X86 support" ON)
|
|
||||||
option(X86_REDUCE "X86 with reduce instruction sets to minimize library" OFF)
|
|
||||||
option(SPARC_SUPPORT "Sparc support" ON)
|
option(SPARC_SUPPORT "Sparc support" ON)
|
||||||
option(SYSZ_SUPPORT "SystemZ support" ON)
|
option(SYSZ_SUPPORT "SystemZ support" ON)
|
||||||
option(XCORE_SUPPORT "XCore support" ON)
|
option(XCORE_SUPPORT "XCore support" ON)
|
||||||
|
option(X86_SUPPORT "X86 support" ON)
|
||||||
|
option(X86_REDUCE "X86 with reduce instruction sets to minimize library" OFF)
|
||||||
|
# End of compile-time option
|
||||||
|
# DO NOT modify anything below
|
||||||
|
|
||||||
|
set(VERSION_MAJOR 2)
|
||||||
|
set(VERSION_MINOR 1)
|
||||||
|
set(VERSION_PATCH 2)
|
||||||
|
|
||||||
if (USE_DEFAULT_ALLOC)
|
if (USE_DEFAULT_ALLOC)
|
||||||
add_definitions(-DCAPSTONE_USE_SYS_DYN_MEM)
|
add_definitions(-DCAPSTONE_USE_SYS_DYN_MEM)
|
||||||
|
@ -86,6 +91,16 @@ endif ()
|
||||||
|
|
||||||
if (X86_SUPPORT)
|
if (X86_SUPPORT)
|
||||||
add_definitions(-DCAPSTONE_HAS_X86)
|
add_definitions(-DCAPSTONE_HAS_X86)
|
||||||
|
if (BUILD_DIET)
|
||||||
|
set(SOURCES
|
||||||
|
${SOURCES}
|
||||||
|
arch/X86/X86Disassembler.c
|
||||||
|
arch/X86/X86DisassemblerDecoder.c
|
||||||
|
arch/X86/X86IntelInstPrinter.c
|
||||||
|
arch/X86/X86Mapping.c
|
||||||
|
arch/X86/X86Module.c
|
||||||
|
)
|
||||||
|
else ()
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
${SOURCES}
|
${SOURCES}
|
||||||
arch/X86/X86ATTInstPrinter.c
|
arch/X86/X86ATTInstPrinter.c
|
||||||
|
@ -95,6 +110,7 @@ if (X86_SUPPORT)
|
||||||
arch/X86/X86Mapping.c
|
arch/X86/X86Mapping.c
|
||||||
arch/X86/X86Module.c
|
arch/X86/X86Module.c
|
||||||
)
|
)
|
||||||
|
endif ()
|
||||||
set(TEST_SOURCES ${TEST_SOURCES} test_x86.c)
|
set(TEST_SOURCES ${TEST_SOURCES} test_x86.c)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue