1
- cmake_minimum_required (VERSION 3.14 )
1
+ cmake_minimum_required (VERSION 3.24..4.0 )
2
2
3
3
#
4
4
# Project details
5
5
#
6
6
7
- project ("databento" VERSION 0.33.0 LANGUAGES CXX)
7
+ project (
8
+ databento
9
+ VERSION 0.34.0
10
+ LANGUAGES CXX
11
+ DESCRIPTION "Official Databento client library"
12
+ )
8
13
string (TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPERCASE)
9
14
10
15
#
@@ -83,6 +88,7 @@ endif()
83
88
84
89
add_library (
85
90
${PROJECT_NAME}
91
+ STATIC
86
92
${headers}
87
93
${sources}
88
94
)
@@ -101,6 +107,7 @@ message(STATUS "Added all header and implementation files.")
101
107
#
102
108
103
109
target_compile_features (${PROJECT_NAME} PUBLIC cxx_std_17)
110
+ set_target_properties (${PROJECT_NAME} PROPERTIES CXX_EXTENSIONS OFF )
104
111
include (cmake/CompilerWarnings.cmake)
105
112
set_target_warnings(${PROJECT_NAME} )
106
113
include (cmake/Sanitizers.cmake)
@@ -143,19 +150,11 @@ else()
143
150
set (json_version 3.11.3)
144
151
# Required to correctly install nlohmann_json
145
152
set (JSON_Install ON )
146
- if (CMAKE_VERSION VERSION_LESS 3.24)
147
- FetchContent_Declare(
148
- json
149
- URL https://github.com/nlohmann/json/releases/download/v${json_version} /json.tar.xz
150
- )
151
- else ()
152
- # DOWNLOAD_EXTRACT_TIMESTAMP added in 3.24
153
- FetchContent_Declare(
154
- json
155
- URL https://github.com/nlohmann/json/releases/download/v${json_version} /json.tar.xz
156
- DOWNLOAD_EXTRACT_TIMESTAMP TRUE
157
- )
158
- endif ()
153
+ FetchContent_Declare(
154
+ json
155
+ URL https://github.com/nlohmann/json/releases/download/v${json_version} /json.tar.xz
156
+ DOWNLOAD_EXTRACT_TIMESTAMP TRUE
157
+ )
159
158
FetchContent_MakeAvailable(json)
160
159
# Ignore compiler warnings in headers
161
160
add_system_include_property(nlohmann_json)
@@ -175,19 +174,11 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_HTTPLIB)
175
174
endif ()
176
175
else ()
177
176
set (httplib_version 0.20.0)
178
- if (CMAKE_VERSION VERSION_LESS 3.24)
179
- FetchContent_Declare(
180
- httplib
181
- URL https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${httplib_version} .tar.gz
182
- )
183
- else ()
184
- # DOWNLOAD_EXTRACT_TIMESTAMP added in 3.24
185
- FetchContent_Declare(
186
- httplib
187
- URL https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${httplib_version} .tar.gz
188
- DOWNLOAD_EXTRACT_TIMESTAMP TRUE
189
- )
190
- endif ()
177
+ FetchContent_Declare(
178
+ httplib
179
+ URL https://github.com/yhirose/cpp-httplib/archive/refs/tags/v${httplib_version} .tar.gz
180
+ DOWNLOAD_EXTRACT_TIMESTAMP TRUE
181
+ )
191
182
FetchContent_MakeAvailable(httplib)
192
183
# Ignore compiler warnings in headers
193
184
add_system_include_property(httplib)
@@ -207,19 +198,11 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_DATE)
207
198
endif ()
208
199
else ()
209
200
set (date_version 3.0.3)
210
- if (CMAKE_VERSION VERSION_LESS 3.24)
211
- FetchContent_Declare(
212
- date_src
213
- URL https://github.com/HowardHinnant/date/archive/refs/tags/v${date_version} .tar.gz
214
- )
215
- else ()
216
- # DOWNLOAD_EXTRACT_TIMESTAMP added in 3.24
217
- FetchContent_Declare(
218
- date_src
219
- URL https://github.com/HowardHinnant/date/archive/refs/tags/v${date_version} .tar.gz
220
- DOWNLOAD_EXTRACT_TIMESTAMP TRUE
221
- )
222
- endif ()
201
+ FetchContent_Declare(
202
+ date_src
203
+ URL https://github.com/HowardHinnant/date/archive/refs/tags/v${date_version} .tar.gz
204
+ DOWNLOAD_EXTRACT_TIMESTAMP TRUE
205
+ )
223
206
FetchContent_MakeAvailable(date_src)
224
207
# Ignore compiler warnings in headers
225
208
add_system_include_property(date)
0 commit comments