-
Notifications
You must be signed in to change notification settings - Fork 26
/
LagrangeOptions.cmake.sample
127 lines (106 loc) · 7.71 KB
/
LagrangeOptions.cmake.sample
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#
# Copyright 2020 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
# In order to persistently set default options for your project, copy this file
# and remove the '.sample' suffix. Then uncomment the relevant options for your
# project. Note that this file is included before `project(Lagrange)` is defined,
# so we can use it to define the C and C++ compilers, but some variables such as
# PROJECT_SOURCE_DIR will not be defined yet. You can use CMAKE_SOURCE_DIR instead.
################################################################################
# CMake Options
################################################################################
# Specify a custom install prefix path
# set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE STRING "Install directory used by install().")
# Generates a `compile_commands.json` that can be used for autocompletion
# set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "Enable/Disable output of compile commands during generation.")
# Use a specific C/C++ compiler, e.g. llvm-clang on macOS (so we can use clangd)
# set(CMAKE_C_COMPILER "/usr/local/opt/llvm/bin/clang" CACHE STRING "C compiler")
# set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++" CACHE STRING "C++ compiler")
# Set deployment platform for macOS
# set(CMAKE_OSX_DEPLOYMENT_TARGET 12.0 CACHE STRING "macOS deployment target")
# Compile universal binaries on macOS
# set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "macOS architectures")
# Always add colored output (e.g. when using Ninja)
# list(APPEND CMAKE_CXX_FLAGS -fdiagnostics-color=always) # GCC
# list(APPEND CMAKE_CXX_FLAGS -fcolor-diagnostics) # Clang
################################################################################
# Lagrange Options
################################################################################
# Meta option.
# option(LAGRANGE_ALL "Build all lagrange modules" ON)
# Optional modules in alphabetical order.
# option(LAGRANGE_MODULE_BVH "Build module lagrange::bvh" ON)
# option(LAGRANGE_MODULE_FS "Build module lagrange::fs" ON)
# option(LAGRANGE_MODULE_IMAGE "Build module lagrange::image" ON)
# option(LAGRANGE_MODULE_IMAGE_IO "Build module lagrange::image_io" ON)
# option(LAGRANGE_MODULE_IO "Build module lagrange::io" ON)
# option(LAGRANGE_MODULE_PARTITIONING "Build module lagrange::partitioning" ON)
# option(LAGRANGE_MODULE_POISSON "Build module lagrange::poisson" ON)
# option(LAGRANGE_MODULE_PYTHON "Build module lagrange::python" ON)
# option(LAGRANGE_MODULE_RAYCASTING "Build module lagrange::raycasting" ON)
# option(LAGRANGE_MODULE_SCENE "Build module lagrange::scene" ON)
# option(LAGRANGE_MODULE_SUBDIVISION "Build module lagrange::subdivision" ON)
# option(LAGRANGE_MODULE_UI "Build module lagrange::ui" ON)
# option(LAGRANGE_MODULE_VOLUME "Build module lagrange::volume" ON)
# option(LAGRANGE_MODULE_WINDING "Build module lagrange::winding" ON)
# General options
# option(LAGRANGE_COMPILE_TESTS "Enable compilation tests" ON)
# option(LAGRANGE_DOCUMENTATION "Build Doxygen documentation" ON)
# option(LAGRANGE_EXAMPLES "Build all examples" ON)
# option(LAGRANGE_INSTALL "Enable installation" OFF)
# option(LAGRANGE_PERFORMANCE_TESTS "Build all performance tests" ON)
# option(LAGRANGE_UNIT_TESTS "Build all unit tests" ON)
# Specific options
# option(LAGRANGE_ASSERT_DEBUG_BREAK "Assert will break into debugger on failure" OFF)
# option(LAGRANGE_COMPILE_TESTS "Enable compilation tests" ON)
# option(LAGRANGE_DISABLE_FPE "Disable floating point exception code" OFF)
# option(LAGRANGE_ENABLE_GPU_TESTS "Enable unit tests that run on the GPU" ON)
# option(LAGRANGE_MORE_WARNINGS "Increase the level of warnings when compiling" OFF)
# option(LAGRANGE_SLOW_TESTS "Enable slow unit tests" ON)
# option(LAGRANGE_USE_PCH "Enable precompiled headers" ON)
# option(LAGRANGE_USE_WASM_EXCEPTIONS "Use -fwasm-exception flag with Emscripten" OFF)
# option(LAGRANGE_WITH_ASSIMP "Add assimp functionality to lagrange::io" ON)
# option(LAGRANGE_WITH_ONETBB "Build Lagrange with OneTBB 2021 rather than TBB 2020" ON)
# option(LAGRANGE_WITH_TRACY "Build tracy client with Lagrange" ON)
# Non-boolean options
# set(LAGRANGE_DATA_FOLDER "<path/to/data>" CACHE PATH "Where to download or find test data")
# set(LAGRANGE_FS_BACKEND "ghc" CACHE STRING "Which file system backend to use? Options are 'std', 'ghc' and 'boost'. Default is 'ghc'")
# Allowlist/blocklist restricting which modules are allowed in the sub-project. This is an advanced
# option, targeted at users who wish to have explicit knowledge of which module is implicitly
# compiled by Lagrange. By default, an empty list means all modules are allowed.
# set(LAGRANGE_ALLOWLIST core testing io fs ui CACHE STRING "List of modules allowed in the project (empty: allow everything)" FORCE)
# set(LAGRANGE_BLOCKLIST io fs ui CACHE STRING "List of modules excluded from the project" FORCE)
# Options for third-party libraries
# set(MKL_INTERFACE "lp64" CACHE STRING "Interface layer to use with MKL (lp64 or ilp64)")
# set(MKL_LINKING "static" CACHE STRING "Linking strategy to use with MKL (static, dynamic or sdl)")
# set(MKL_THREADING "tbb" CACHE STRING "Threading layer to use with MKL (sequential, tbb or openmp)")
# option(TBB_PREFER_STATIC "Use the static version of TBB for the alias target" ON)
################################################################################
# Tools Options
################################################################################
# Sanitizers
# set(USE_SANITIZER
# "Address;Undefined"
# CACHE STRING
# "Compile with a sanitizer. Options are: Address, Memory, MemoryWithOrigins, Undefined, Thread, Leak, 'Address;Undefined', CFI"
# )
# Code coverage.
# 1. Compile & run unit tests as usual.
# 2. Run the target `ccov-all` to produce coverage results (`make ccov-all`)
# 3. Open result page `<build>/ccov/all-merged/index.html`
# option(CODE_COVERAGE "Builds targets with code coverage instrumentation. (Requires GCC or Clang)" ON)
################################################################################
# FetchContent Options
################################################################################
# option(FETCHCONTENT_FULLY_DISCONNECTED "Disables all attempts to download or update content and assumes source dirs already exist" ON)
# option(FETCHCONTENT_UPDATES_DISCONNECTED "Enables UPDATE_DISCONNECTED behavior for all content population" ON)
# option(FETCHCONTENT_QUIET "Enables QUIET option for all content population" ON)
# set(FETCHCONTENT_BASE_DIR "${CMAKE_BINARY_DIR}/_deps" CACHE PATH "Directory under which to collect all populated content")