-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
61 lines (49 loc) · 2.06 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
cmake_minimum_required(VERSION 3.25.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# PROJECT_VERSION_MAJOR year
# PROJECT_VERSION_MINOR month
# PROJECT_VERSION_PATCH day
# PROJECT_VERSION_TWEAK tweak
project(mv VERSION 2023.01.28.0)
if(PROJECT_IS_TOP_LEVEL)
cmake_host_system_information(RESULT HOST QUERY HOSTNAME)
cmake_host_system_information(RESULT OSN QUERY OS_NAME)
cmake_host_system_information(RESULT OS_VERSION QUERY OS_RELEASE)
cmake_host_system_information(RESULT PROC QUERY PROCESSOR_DESCRIPTION)
message(STATUS "-------------------------------------")
message(STATUS " Project: ${PROJECT_NAME}")
message(STATUS " Version: ${CMAKE_PROJECT_VERSION}")
message(STATUS " C++ ${CMAKE_CXX_STANDARD}")
message(STATUS "-------------------------------------")
message(STATUS " ${HOST}")
message(STATUS " ${OSN}: ${OS_VERSION}")
message(STATUS " ${PROC}")
message(STATUS "-------------------------------------")
set(BUILD_EXAMPLES ON)
set(BUILD_GTESTS ON)
else()
message(STATUS "-> ${PROJECT_NAME} is submodule")
set(BUILD_EXAMPLES OFF)
set(BUILD_GTESTS OFF)
endif()
# configure_file(${path to configure file 'config.h.in'}
# include_directories(${PROJECT_BINARY_BIN}) // this allows the 'config.h' file to be used throughout the program
# set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
# set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
# set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
# include(CPack)
# Boost -----------------------------------------------------------
# find_package(Boost REQUIRED system)
# Threads ---------------------------------------------------------
# find_package(Threads REQUIRED)
add_library(${PROJECT_NAME} INTERFACE)
target_include_directories(${PROJECT_NAME} INTERFACE src)
# Examples -------------------------------------------------------
# if(${BUILD_EXAMPLES})
# add_subdirectory(examples/unix)
# endif()
# Tests --------------------------------------------------------------
if(${BUILD_GTESTS})
add_subdirectory(test)
endif()