CMakeLists.txt 1.39 KB
Newer Older
1
cmake_minimum_required (VERSION 2.6)
2
project (EMBB_linearizability_test C CXX)
3 4 5

find_package(Threads REQUIRED)

6
#linux build
7 8 9 10

IF (NOT WIN32)
  
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lrt")
11 12 13 14 15
	set(PROJECT_LINK_LIBS
	${CMAKE_CURRENT_SOURCE_DIR}/../build/base_cpp/libembb_base_cpp.a 
	${CMAKE_CURRENT_SOURCE_DIR}/../build/base_c/libembb_base_c.a 
	${CMAKE_CURRENT_SOURCE_DIR}/../build/containers_cpp/libembb_containers_cpp.a
	)
16
ENDIF (NOT WIN32)
17 18 19 20 21 22 23 24 25 26 27 28

# windows build 
IF (WIN32)
set(PROJECT_LINK_LIBS
	${CMAKE_CURRENT_SOURCE_DIR}/../build/base_cpp/Release/embb_base_cpp.lib 
	${CMAKE_CURRENT_SOURCE_DIR}/../build/base_c/Release/embb_base_c.lib
	${CMAKE_CURRENT_SOURCE_DIR}/../build/containers_cpp/Release/embb_containers_cpp.lib
	)
ENDIF (WIN32)



29 30 31 32 33 34 35 36

if(CMAKE_USE_PTHREADS_INIT)
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
endif()

# setting directories
# link_directories(/home/lucapegolotti/embb/build)

37 38 39 40 41 42 43 44 45
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/../base_cpp/include
${CMAKE_CURRENT_SOURCE_DIR}/../build/base_cpp/include
${CMAKE_CURRENT_SOURCE_DIR}/../base_c/include
${CMAKE_CURRENT_SOURCE_DIR}/../build/base_c/include
${CMAKE_CURRENT_SOURCE_DIR}/../containers_cpp/include
${CMAKE_CURRENT_SOURCE_DIR}/../build/containers_cpp/include
${CMAKE_CURRENT_SOURCE_DIR}/src
)
46

47

48

49
add_executable(${PROJECT_NAME} main.cc)
50
target_link_libraries(${PROJECT_NAME} ${CMAKE_THREAD_LIBS_INIT} ${PROJECT_LINK_LIBS})
51