-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
54 lines (42 loc) · 1.74 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
cmake_minimum_required(VERSION 3.17)
set(MV_MAIN "mv-main")
PROJECT(${MV_MAIN})
# -----------------------------------------------------------------------------
# User options
# -----------------------------------------------------------------------------
# Ask the user to set a ManiVault installation directory
if(NOT DEFINED MV_INSTALL_DIR)
set(MV_INSTALL_DIR "" CACHE PATH "Directory where ManiVault is, or should be installed")
message(FATAL_ERROR "Please set MV_INSTALL_DIR to the directory where ManiVault is, or should be installed")
endif()
file(TO_CMAKE_PATH ${MV_INSTALL_DIR} MV_INSTALL_DIR)
# Other user-facing options
option(MV_USE_GTEST "Use GoogleTest" OFF)
option(MV_USE_AVX "Use AVX if available - by default OFF" OFF)
option(MV_PRECOMPILE_HEADERS "Precompile several headers for faster compilation" ON)
option(MV_UNITY_BUILD "Combine target source files into batches for faster compilation" OFF)
if(MV_PRECOMPILE_HEADERS)
message(STATUS "Using precompiled headers: ON")
endif()
if(MV_UNITY_BUILD)
message(STATUS "Using unity build: ON")
endif()
if(MV_USE_AVX)
message(STATUS "Using AVX: ON")
endif()
# defines MV_VERSION
include(ManiVault/cmake/Utils.cmake)
mv_set_version()
# -----------------------------------------------------------------------------
# Tests
# -----------------------------------------------------------------------------
if (MV_USE_GTEST)
message(WARNING "MV_USE_GTEST: currently no test are available")
#enable_testing()
#add_subdirectory(external/googletest)
endif()
# -----------------------------------------------------------------------------
# Main project
# -----------------------------------------------------------------------------
# ManiVault core system
add_subdirectory(ManiVault)