-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
30 lines (25 loc) · 1.12 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
# This is not the actual CMakeLists.txt for this project, see
# `vesin/CMakeLists.txt` for it. Instead, this file is here to enable `cmake ..`
# from a git checkout, `add_subdirectory` and `FetchContent` without having to
# specify a subdirectory.
cmake_minimum_required(VERSION 3.16)
project(vesin-git LANGUAGES NONE)
if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
set(VESIN_MAIN_PROJECT ON)
else()
set(VESIN_MAIN_PROJECT OFF)
endif()
if (VESIN_MAIN_PROJECT)
if("${CMAKE_BUILD_TYPE}" STREQUAL "" AND "${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
message(STATUS "Setting build type to 'release' as none was specified.")
set(
CMAKE_BUILD_TYPE "release"
CACHE STRING
"Choose the type of build, options are: none(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) debug release relwithdebinfo minsizerel."
FORCE
)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS release debug relwithdebinfo minsizerel none)
endif()
endif()
set(VESIN_INSTALL ${VESIN_MAIN_PROJECT} CACHE BOOL "Install Vesin's headers and libraries")
add_subdirectory(vesin)