-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathCMakeLists.txt
47 lines (35 loc) · 1.34 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
cmake_minimum_required(VERSION 2.8)
project(dag)
set(DAG_MAJOR_VERSION 1)
set(DAG_MINOR_VERSION 0)
set(DAG_PATCH_VERSION 0)
set(DAG_VERSION
${DAG_MAJOR_VERSION}.${DAG_MINOR_VERSION}.${DAG_PATCH_VERSION})
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
if(APPLE)
set(CMAKE_SHARED_LIBRARY_SUFFIX ".so")
set(CMAKE_MACOSX_RPATH 1)
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.10)
endif(APPLE)
#--- Declare options -----------------------------------------------------------
option(dag_documentation "Whether or not to create doxygen doc target.")
option(dag_example "Whether or not to create examples")
add_definitions(-Wno-unused-variable -Wno-unused-parameter)
#
#--- enable unit testing capabilities ------------------------------------------
include(CTest)
add_subdirectory(dag)
add_subdirectory(tests)
if(dag_example)
add_subdirectory(examples)
endif(dag_example)
if(dag_documentation)
include(cmake/dagDoxygen.cmake)
endif()
#--- add version files ---------------------------------------------------------
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dagVersion.h
${CMAKE_CURRENT_BINARY_DIR}/dagVersion.h )
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/dagVersion.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/dag/ )
#--- add CMake infrastructure --------------------------------------------------
include(cmake/dagCreateConfig.cmake)