Files
fail/tools/import-trace/CMakeLists.txt
Richard Hellwig 13175c259b import-trace: import debug info
If the --debug option is set, the line number table of the elf binary will
be imported into the database. The information will be stored in the
"dbg_mapping" table.

If the --sources option is set, the source files will be imported
into the database. Only the files that were actually used in the
elf binary will be imported.

Change-Id: I0e9de6b456bc42b329c1700c25e5839d9552cdbb
2014-01-28 11:07:34 +01:00

44 lines
1.0 KiB
CMake

set(SRCS
Importer.cc
MemoryImporter.cc
)
if (BUILD_LLVM_DISASSEMBLER)
set(SRCS ${SRCS}
InstructionImporter.cc
RegisterImporter.cc
RandomJumpImporter.cc
AdvancedMemoryImporter.cc
ElfImporter.cc
)
include(FindLLVM)
# llvm-config does add -fno-exception to the command line. But this
# breaks some boost libraries.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS} -fexceptions")
find_package(Boost 1.42 COMPONENTS regex REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
endif(BUILD_LLVM_DISASSEMBLER)
find_package(MySQL REQUIRED)
include_directories(${MYSQL_INCLUDE_DIR})
add_executable(import-trace main.cc ${SRCS})
target_link_libraries(import-trace
${PROTOBUF_LIBRARY}
${MYSQL_LIBRARIES}
fail-util
fail-comm
fail-sal
)
if (BUILD_LLVM_DISASSEMBLER)
target_link_libraries(import-trace fail-llvmdisassembler fail-sal ${LLVM_LIBS} ${LLVM_LDFLAGS} ${Boost_LIBRARIES})
endif (BUILD_LLVM_DISASSEMBLER)
install(TARGETS import-trace RUNTIME DESTINATION bin)