cmake_minimum_required(VERSION 2.8.11)

project(Dyninst_issue)

if(NOT DEFINED ENV{DYNINST_ROOT})
message(FATAL_ERROR "DYNINST_ROOT not defined!!!")
else()
message(DYNINST_ROOT=$ENV{DYNINST_ROOT})
endif()

set(CMAKE_VERBOSE_MAKEFILE on)
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-Wall -g -O0 -std=c++11")

include_directories($ENV{DYNINST_ROOT})
include_directories($ENV{DYNINST_ROOT}/common/src)

add_executable(binst binst.cpp)
target_link_libraries(binst dyninstAPI instructionAPI patchAPI common)

add_executable(chrono chrono.cpp)
add_executable(without_chrono without_chrono.cpp)
