-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
29 lines (24 loc) · 916 Bytes
/
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
cmake_minimum_required (VERSION 3.14)
project (filesaver CXX)
set (CMAKE_CXX_STANDARD 17)
include (./cmake/StandardProjectSettings.cmake)
include (./cmake/CompilerWarnings.cmake)
include (./cmake/StaticAnalyzers.cmake)
add_library(project_options INTERFACE)
target_compile_features(project_options INTERFACE cxx_std_17)
add_library(project_warnings INTERFACE)
set_project_warnings(project_warnings)
file (READ ./dependencies.txt DEPENDENCIES)
message("-- DEPENDENCIES=${DEPENDENCIES}")
set (
CONAN_REQUIRES
${DEPENDENCIES}
)
include (./cmake/Conan.cmake)
run_conan()
execute_process(COMMAND git describe --tags HEAD RESULT_VARIABLE GIT_SHORT_HASH_RESULT OUTPUT_VARIABLE GIT_SHORT_HASH)
string(REGEX REPLACE "\n$" "" GIT_SHORT_HASH "${GIT_SHORT_HASH}")
message("-- GIT_SHORT_HASH=${GIT_SHORT_HASH}")
add_compile_definitions(GIT_SHORT_HASH="${GIT_SHORT_HASH}")
add_subdirectory (src)
add_subdirectory (tests)