This repository was archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.cmake
76 lines (60 loc) · 1.93 KB
/
configure.cmake
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
project(git++ CXX)
set(${PROJECT_NAME}_VERSION_MAJOR 1)
set(${PROJECT_NAME}_VERSION_MINOR 0)
# general path configuration
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
#CMAKE SETUP AND CONFIGURATION
###############################
# setup modules
include(FindDoxygen DOXYGEN_SKIP_DOT)
set(Boost_USE_STATIC_LIBS ON)
find_package(Boost 1.45.0 COMPONENTS date_time filesystem system unit_test_framework)
if(NOT Boost_FOUND)
message(SEND_FAILURE "Require boost libraries")
endif(NOT Boost_FOUND)
# setup compiler
if(UNIX)
# show all warnings
# use c++0x features
# make throw() semantically equivalent to noexcept (std::exception uses throw() for instance)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}\ -Wall -std=c++0x -fnothrow-opt")
endif(UNIX)
if(DOXYGEN)
include(UseDoxygen.cmake)
else(DOXYGEN)
message(WARNING "Doxygen was not found - documentation will not be built")
endif(DOXYGEN)
include(fun.cmake)
# CONFIGURE INCLUDE
####################
include_directories(src test SYSTEM)
configure_file(src/git/config.h.in src/git/config.h)
# CONFIGURE LIBRARIES
#####################
add_library(gitpp STATIC
src/git/obj/object.cpp
src/git/obj/stream.cpp
src/git/obj/tree.cpp
src/git/obj/commit.cpp
src/git/obj/tag.cpp
src/git/obj/blob.cpp
src/git/obj/multiobj.cpp
src/git/db/odb_mem.cpp
src/git/db/odb_loose.cpp
src/git/db/util.cpp
src/git/db/sha1_gen.cpp)
# CONFIGURE EXECUTABLES
########################
# TEST SETUP
############
enable_testing()
add_model_test_executable(model_odb_test model_odb
test/gtl/db/model_odb_test.cpp)
add_lib_test_executable(lib_odb_test lib_odb
test/git/db/lib_odb_test.cpp)
add_lib_test_executable(lib_sha1_performance_test lib_sha1_perf
test/git/db/sha1_performance_test.cpp)
add_lib_test_executable(lib_looseodb_performance_test lib_looseodb_perf
test/git/db/looseodb_performance_test.cpp)