-
Notifications
You must be signed in to change notification settings - Fork 54
/
CMakeLists.txt
61 lines (52 loc) · 2.81 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
##==================================================================================================
## EVE - Expressive Vector Engine
## Copyright 2018 Joel FALCOU
##
## Licensed under the MIT License <http://opensource.org/licenses/MIT>.
## SPDX-License-Identifier: MIT
##==================================================================================================
cmake_minimum_required(VERSION 3.2)
## =================================================================================================
## Setup project
## =================================================================================================
project(eve LANGUAGES CXX)
set(PROJECT_VERSION 1.18.6.0)
set(PROJECT_DOC_DIR ${PROJECT_SOURCE_DIR}/doc)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake )
## =================================================================================================
## No in-source build
## =================================================================================================
if (${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR})
message( FATAL_ERROR "[eve] Building in-source, not recommended! Build in a separate directory." )
endif()
## =================================================================================================
## Compute version string and mode
## =================================================================================================
include(parse_revision)
## =================================================================================================
## Options
## =================================================================================================
option( EVE_BUILD_TEST "Build tests for eve" ON )
option( EVE_BUILD_BENCHMARKS "Build benchmarks for eve" ON )
option( EVE_BUILD_DOC "Build documentation for eve" ON )
message( STATUS "[eve] Building ${CMAKE_BUILD_TYPE} mode with: ${CMAKE_CXX_FLAGS}")
## =================================================================================================
## Install target
## =================================================================================================
install(DIRECTORY ${PROJECT_SOURCE_DIR}/include DESTINATION .)
## =================================================================================================
## Setup Documentation
## =================================================================================================
if( EVE_BUILD_TEST )
add_subdirectory(doc)
endif()
## =================================================================================================
## Test and Benchmarks target
## =================================================================================================
include(CTest)
if( EVE_BUILD_TEST )
include(test)
endif()
if( EVE_BUILD_BENCHMARKS )
include(benchmark)
endif()