-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
54 lines (42 loc) · 1.1 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
47
48
49
50
51
52
53
54
cmake_minimum_required(VERSION 2.8)
project(rr-thread-pool)
ADD_DEFINITIONS(-std=c++11)
include_directories(BEFORE src)
add_library(tp-lib OBJECT
src/Cond.cpp
src/MessageQueue.cpp
src/Mutex.cpp
src/Thread.cpp
src/ThreadPool.cpp
src/Trace.cpp
src/Cond.h
src/Locker.h
src/Message.h
src/MessageQueue.h
src/Mutex.h
src/Task.h
src/Thread.h
src/ThreadPool.h
src/Trace.h)
add_library(tp-doc OBJECT
doc/Documentation.h)
add_executable(tp-ut
$<TARGET_OBJECTS:tp-lib>
test/test_Main.cpp
test/test_MessageQueue.cpp
test/test_PI.cpp
test/test_Thread.cpp
test/test_ThreadPool.cpp)
FIND_PACKAGE(Doxygen)
IF(DOXYGEN_FOUND)
SET(DOXYGEN_INPUT Doxyfile)
SET(DOXYGEN_OUTPUT html)
ADD_CUSTOM_COMMAND(
OUTPUT ${DOXYGEN_OUTPUT}
COMMAND ${CMAKE_COMMAND} -E echo_append "Building API Documentation..."
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYGEN_INPUT}
COMMAND ${CMAKE_COMMAND} -E echo "Done."
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${DOXYGEN_INPUT})
ADD_CUSTOM_TARGET(doc ALL DEPENDS ${DOXYGEN_OUTPUT})
ENDIF(DOXYGEN_FOUND)