forked from USCiLab/cereal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (27 loc) · 1.13 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
cmake_minimum_required (VERSION 2.6.2)
project (cereal)
option(SKIP_PORTABILITY_TEST "Skip portability tests" OFF)
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror -g -Wextra -Wshadow -pedantic ${CMAKE_CXX_FLAGS}")
include_directories(./include)
find_package(Boost COMPONENTS serialization unit_test_framework)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
enable_testing()
add_subdirectory(unittests)
endif(Boost_FOUND)
add_subdirectory(sandbox)
find_package(Doxygen)
if(DOXYGEN_FOUND)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.in" "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg" @ONLY)
add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
COMMENT "Generating API documentation with Doxygen" VERBATIM
)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scripts/updatedoc.in" "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh" @ONLY)
add_custom_target(update-doc
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/updatedoc.sh"
DEPENDS doc
COMMENT "Copying documentation to gh-pages branch" VERBATIM
)
endif(DOXYGEN_FOUND)