Skip to content

Commit 18471a3

Browse files
committed
Added cholmod support
1 parent d08e5be commit 18471a3

33 files changed

+192
-102
lines changed

CMakeLists.txt

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@ if (PROJECT_IS_TOP_LEVEL)
1313
# Options for the project
1414
option(USE_PYBIND "Generate pybindings" ON)
1515
option(USE_MULTIPRECISION "Use high precision floating point" OFF)
16-
option(ENABLE_VISUALIZATION "Generate viewers for visualization" ON)
16+
option(ENABLE_VISUALIZATION "Generate viewers for visualization" OFF)
1717
option(CHECK_VALIDITY "Check validity pre and post conditions" ON)
1818
option(BUILD_CURVATURE_METRIC_TESTS "Build tests" ON)
19+
option(USE_SUITESPARSE "Use suite sparse methods for matrix inversion" ON)
1920

2021
# Set libigl options
2122
option(LIBIGL_PREDICATES "Use Predicates" ON)
22-
option(RENDER_TEXTURE "Render results" ON)
23-
option(LIBIGL_OPENGL "Use OpenGL" ON)
24-
option(LIBIGL_GLFW "Use GLFW" ON)
25-
option(LIBIGL_PNG "Use PNG" ON)
26-
option(LIBIGL_EMBREE "Use EMBREE" ON)
23+
option(RENDER_TEXTURE "Render results" OFF)
24+
option(LIBIGL_OPENGL "Use OpenGL" OFF)
25+
option(LIBIGL_GLFW "Use GLFW" OFF)
26+
option(LIBIGL_PNG "Use PNG" OFF)
27+
option(LIBIGL_EMBREE "Use EMBREE" OFF)
2728
endif()
2829

2930
find_package(Boost REQUIRED COMPONENTS system filesystem serialization)
@@ -59,6 +60,10 @@ if(USE_MULTIPRECISION)
5960
add_compile_definitions(MULTIPRECISION)
6061
endif()
6162

63+
if(USE_SUITESPARSE)
64+
add_compile_definitions(USE_SUITESPARSE)
65+
endif()
66+
6267
add_compile_definitions(USE_EMBREE)
6368
add_compile_definitions(_USE_MATH_DEFINES)
6469

@@ -97,6 +102,13 @@ if(ENABLE_VISUALIZATION)
97102
)
98103
endif()
99104

105+
if(USE_SUITESPARSE)
106+
include(suitesparse)
107+
target_link_libraries(MetricOptimizationLib PUBLIC
108+
SuiteSparse::CHOLMOD
109+
)
110+
endif()
111+
100112
# Build pybind optimization functions
101113
message("FIXME Building pybind libraries")
102114

cmake/suitesparse.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
include(FetchContent)
2+
FetchContent_Declare(
3+
suitesparse
4+
SYSTEM
5+
GIT_REPOSITORY https://github.com/DrTimothyAldenDavis/SuiteSparse.git
6+
GIT_TAG stable
7+
)
8+
FetchContent_MakeAvailable(suitesparse)
-19 Bytes
Binary file not shown.
-19 Bytes
Binary file not shown.
-19 Bytes
Binary file not shown.
45 Bytes
Binary file not shown.
-17 Bytes
Binary file not shown.
-19 Bytes
Binary file not shown.
-19 Bytes
Binary file not shown.
-19 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)