forked from IuricichF/fg_multi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·30 lines (24 loc) · 881 Bytes
/
CMakeLists.txt
File metadata and controls
executable file
·30 lines (24 loc) · 881 Bytes
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
29
30
cmake_minimum_required(VERSION 2.8)
message(STATUS "Start running cmake...")
enable_language(CXX)
if (UNIX AND NOT APPLE)
set(LINUX TRUE)
endif ()
if (LINUX)
message(STATUS "Linux Env.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3")
elseif (APPLE)
message(STATUS "Apple Env.")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -O3")
endif ()
find_package(Boost REQUIRED) # Boost not BOOST in Linux
if (Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${Boost_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Boost_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${Boost_EXE_LINKER_FLAGS}")
endif ()
add_subdirectory(source)
project(NM_Forman CXX)
add_executable(${PROJECT_NAME} "source/main.cpp")
TARGET_LINK_LIBRARIES(${PROJECT_NAME} libFORMAN)