-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
28 lines (21 loc) · 941 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
cmake_minimum_required (VERSION 2.6)
MACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD)
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}"
"${CMAKE_BINARY_DIR}" insource)
GET_FILENAME_COMPONENT(PARENTDIR ${CMAKE_SOURCE_DIR} PATH)
STRING(COMPARE EQUAL "${CMAKE_SOURCE_DIR}"
"${PARENTDIR}" insourcesubdir)
MESSAGE("CMakeLists.txt is in: ${CMAKE_SOURCE_DIR}")
MESSAGE("The command is run from: ${CMAKE_BINARY_DIR}")
IF(insource OR insourcesubdir)
MESSAGE(FATAL_ERROR "Please build in the 'build' subdirectory!")
ENDIF(insource OR insourcesubdir)
ENDMACRO(MACRO_ENSURE_OUT_OF_SOURCE_BUILD)
MACRO_ENSURE_OUT_OF_SOURCE_BUILD()
project (probability-tester)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
FIND_PACKAGE(Boost 1.38 REQUIRED COMPONENTS graph)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES( ${Boost_LIBRARY_DIRS})
add_executable(Main main.cpp)
target_link_libraries(Main ${Boost_LIBRARIES})