-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
83 lines (63 loc) · 2.97 KB
/
Copy pathCMakeLists.txt
File metadata and controls
83 lines (63 loc) · 2.97 KB
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
76
77
78
79
80
81
82
83
#==============================================================================
# nfx-datetime - Top-level CMake configuration
#==============================================================================
#----------------------------------------------
# Project definition
#----------------------------------------------
cmake_minimum_required(VERSION 3.20)
project(nfx-datetime
VERSION 0.6.0
DESCRIPTION "Cross-platform C++ DateTime library with 100-nanosecond precision and ISO 8601 support"
HOMEPAGE_URL "https://github.com/nfx-libs/nfx-datetime"
LANGUAGES CXX
)
#----------------------------------------------
# Version configuration
#----------------------------------------------
set(NFX_DATETIME_VERSION_MAJOR ${PROJECT_VERSION_MAJOR} CACHE INTERNAL "nfx-datetime major version")
set(NFX_DATETIME_VERSION_MINOR ${PROJECT_VERSION_MINOR} CACHE INTERNAL "nfx-datetime minor version")
set(NFX_DATETIME_VERSION_PATCH ${PROJECT_VERSION_PATCH} CACHE INTERNAL "nfx-datetime patch version")
set(NFX_DATETIME_VERSION ${PROJECT_VERSION} CACHE INTERNAL "nfx-datetime version")
#----------------------------------------------
# Testing setup
#----------------------------------------------
enable_testing()
#----------------------------------------------
# Build options
#----------------------------------------------
# --- Library build types ---
option(NFX_DATETIME_BUILD_STATIC "Build static library" ON )
option(NFX_DATETIME_BUILD_SHARED "Build shared library" OFF)
# --- Build components ---
option(NFX_DATETIME_BUILD_TESTS "Build tests" OFF)
option(NFX_DATETIME_BUILD_SAMPLES "Build samples" OFF)
option(NFX_DATETIME_BUILD_BENCHMARKS "Build benchmarks" OFF)
option(NFX_DATETIME_BUILD_DOCUMENTATION "Build Doxygen documentation" OFF)
# --- Performance options ---
option(NFX_DATETIME_ENABLE_SIMD "Enable native CPU optimizations" ON )
# --- Installation and packaging ---
option(NFX_DATETIME_INSTALL_PROJECT "Install project" OFF)
option(NFX_DATETIME_PACKAGE_SOURCE "Enable source package generation" OFF)
#----------------------------------------------
# CMake modules configuration
#----------------------------------------------
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
#----------------------------------------------
# Main configuration
#----------------------------------------------
include(nfxDateTimeBuildConfig)
include(nfxDateTimeDependencies)
include(nfxDateTimeSources)
include(nfxDateTimeTargets)
#----------------------------------------------
# Installation and packaging
#----------------------------------------------
include(nfxDateTimeInstall)
include(nfxDateTimePackaging)
#----------------------------------------------
# Targets
#----------------------------------------------
add_subdirectory(test)
add_subdirectory(samples)
add_subdirectory(benchmark)
add_subdirectory(doc)