-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
72 lines (56 loc) · 1.54 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 3.13)
project(mlibs VERSION 1.0.0 DESCRIPTION "A collection of basic C libraries.")
option(BUILD_DOC "Build documentation" ON)
option(BUILD_TEST "Build tests" ON)
set(COMPOSITE_BUILD YES)
add_compile_definitions(COMPOSITE_BUILD=1)
set(CMAKE_EXPORT_COMPILE_COMMANDS YES)
if (BUILD_DOC)
set(DOXYGEN_GENERATE_HTML YES)
set(DOXYGEN_GENERATE_MAN YES)
set(DOXYGEN_EXCLUDE_PATTERNS */inc/*)
find_package(Doxygen
REQUIRED dot
OPTIONAL_COMPONENTS mscgen dia)
doxygen_add_docs(
doc
${PROJECT_SOURCE_DIR}
COMMENT "Generate documentation"
)
endif()
if (BUILD_TEST)
enable_testing()
find_package(GTest REQUIRED)
endif()
option(BUILD_M_COMMON "Enable building m_common" ON)
if(BUILD_M_COMMON)
add_subdirectory(m_common)
endif()
option(BUILD_M_MEM "Enable building m_mem" ON)
if(BUILD_M_MEM)
add_subdirectory(m_mem)
endif()
option(BUILD_M_ARGS "Enable building m_args" ON)
if(BUILD_M_ARGS)
add_subdirectory(m_args)
endif()
option(BUILD_M_HASH "Enable building m_hash" ON)
if(BUILD_M_HASH)
add_subdirectory(m_hash)
endif()
option(BUILD_M_STR "Enable building m_str" ON)
if(BUILD_M_STR)
add_subdirectory(m_str)
endif()
option(BUILD_M_LIST "Enable building m_list" ON)
if(BUILD_M_LIST)
add_subdirectory(m_list)
endif()
option(BUILD_M_MAP "Enable building m_map" ON)
if(BUILD_M_MAP)
add_subdirectory(m_map)
endif()
option(BUILD_M_LRUCACHE "Enable building m_lrucache" ON)
if(BUILD_M_LRUCACHE)
add_subdirectory(m_lrucache)
endif()