forked from auto-differentiation/xad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (49 loc) · 1.88 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
##############################################################################
#
# Main CMake file
#
# This file is part of XAD, a comprehensive C++ library for
# automatic differentiation.
#
# Copyright (C) 2010-2024 Xcelerit Computing Ltd.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
############## setup ###################
cmake_minimum_required(VERSION 3.15.2)
cmake_policy(SET CMP0092 NEW) # avoid setting warning flags by default in Windows
project(xad
LANGUAGES CXX
DESCRIPTION "Comprehensive C++ library for automatic differentiation."
HOMEPAGE_URL "https://auto-differentiation.github.io"
)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(SetupVersion)
set_property(GLOBAL PROPERTY USE_FOLDERS ON) # allow using solution folders
include(GNUInstallDirs) # for installation directories
include(SetupOptions)
############# build subdirectories ##########
if(NOT XAD_DOCS_ONLY)
include(SetupCompiler)
if(XAD_ENABLE_TESTS)
include(SetupTesting)
endif()
add_subdirectory(src)
if(XAD_ENABLE_TESTS)
add_subdirectory(test)
add_subdirectory(samples)
endif()
endif()
install(FILES CHANGELOG.md LICENSE.md TYPE DOC)