-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
41 lines (30 loc) · 970 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
30
31
32
33
34
35
36
37
38
39
40
41
#
# Main CMake file
#
# Minimum CMake version required to build the software
cmake_minimum_required(VERSION 3.7.2 FATAL_ERROR)
set(CMAKE_VERBOSE_MAKEFILE on)
project(Mercury VERSION 0.1)
# Add cmake directory to include path. These are shared modules from
# https://github.com/bilke/cmake-modules
# See the README there for instructions to update
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(UseBackportedModules)
# Global settings
set(CMAKE_CXX_STANDARD 14)
# Conan
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
# Inject CMake variables for C++ to use
configure_file(
${CMAKE_SOURCE_DIR}/include/mercury/config.h.in
${CMAKE_SOURCE_DIR}/include/mercury/config.h
)
# Add subdirectories
add_subdirectory(src)
if (CMAKE_BUILD_TYPE MATCHES Debug)
if (${CMAKE_VERSION} VERSION_GREATER "3.10.0")
add_subdirectory(test)
endif ()
endif (CMAKE_BUILD_TYPE MATCHES Debug)
enable_testing()