Merge pull request #460 from bwelton/inst_fix
[dyninst.git] / instructionAPI / CMakeLists.txt
1 # CMake configuration for instructionAPI directory
2
3 include_directories (
4     ${PROJECT_SOURCE_DIR}/instructionAPI/src
5   )
6
7
8 set (SRC_LIST
9      src/Instruction.C 
10      src/InstructionAST.C 
11      src/Operation.C 
12      src/Operand.C 
13      src/Register.C 
14      src/Expression.C 
15      src/BinaryFunction.C 
16      src/InstructionCategories.C
17      src/ArchSpecificFormatters.C
18      src/Immediate.C 
19      src/InstructionDecoder.C 
20      src/InstructionDecoder-x86.C
21      src/InstructionDecoder-power.C 
22      src/InstructionDecoder-aarch64.C 
23      src/InstructionDecoderImpl.C
24   )
25 SET_SOURCE_FILES_PROPERTIES(${SRC_LIST} PROPERTIES LANGUAGE CXX)
26
27 # Shave 3 minute off of the time it takes to compile this file by falling back to not tracking
28 # variables by default, rather then waiting until the variable tracking limit
29 # is reached.
30 if (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU")
31 set_source_files_properties(src/InstructionDecoder-aarch64.C PROPERTIES COMPILE_FLAGS
32     -fno-var-tracking-assignments)
33 endif()
34
35 ADD_DEFINITIONS(-DINSTRUCTION_LIB)
36
37 dyninst_library(instructionAPI common)
38
39 target_link_private_libraries(instructionAPI ${Boost_LIBRARIES})
40
41 if (USE_COTIRE)
42     cotire(instructionAPI)
43 endif()