1 cmake_minimum_required(VERSION 3.4.1) 2 3 set(slicer_sources 4 external/slicer/bytecode_encoder.cc 5 external/slicer/code_ir.cc 6 external/slicer/common.cc 7 external/slicer/control_flow_graph.cc 8 external/slicer/debuginfo_encoder.cc 9 external/slicer/dex_bytecode.cc 10 external/slicer/dex_format.cc 11 external/slicer/dex_ir_builder.cc 12 external/slicer/dex_ir.cc 13 external/slicer/dex_utf8.cc 14 external/slicer/instrumentation.cc 15 external/slicer/reader.cc 16 external/slicer/tryblocks_encoder.cc 17 external/slicer/writer.cc) 18 19 add_library(slicer 20 STATIC 21 ${slicer_sources}) 22 23 include_directories(external/jdk external/slicer/export/) 24 25 target_link_libraries(slicer z) 26 27 add_library(dexmakerjvmtiagent 28 SHARED 29 src/main/jni/dexmakerjvmtiagent/agent.cc) 30 31 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -frtti -Wall -Werror -Wno-unused-parameter -Wno-shift-count-overflow -Wno-error=non-virtual-dtor -Wno-sign-compare -Wno-switch -Wno-missing-braces") 32 33 target_link_libraries(dexmakerjvmtiagent slicer) 34