-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathCMakeLists.txt
30 lines (24 loc) · 1.05 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
cmake_minimum_required(VERSION 3.27)
project(sphericart_meta)
enable_testing()
# Set a default build type if none was specified
if (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
if("${CMAKE_BUILD_TYPE}" STREQUAL "" AND "${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
message(STATUS "Setting build type to 'release' as none was specified.")
set(CMAKE_BUILD_TYPE "release"
CACHE STRING
"Choose the type of build, options are: none(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) debug release relwithdebinfo minsizerel."
FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS release debug relwithdebinfo minsizerel none)
endif()
endif()
add_subdirectory(sphericart)
OPTION(SPHERICART_BUILD_TORCH "Build the torch bindings" OFF)
OPTION(SPHERICART_BUILD_EXAMPLES "Build and run examples and benchmarks for Sphericart" OFF)
if (SPHERICART_BUILD_EXAMPLES)
add_subdirectory(examples)
add_subdirectory(benchmarks)
endif()
if (SPHERICART_BUILD_TORCH)
add_subdirectory(sphericart-torch)
endif()