add parabola

This commit is contained in:
2026-05-19 14:17:14 +02:00
parent 8b62881ae8
commit ceeccc7846
7 changed files with 74292 additions and 3 deletions
+16 -3
View File
@@ -8,12 +8,25 @@ add_compile_options(-Wall -Werror -Wpedantic)
find_package(Eigen3 REQUIRED)
add_library(autoopt INTERFACE)
target_include_directories(autoopt INTERFACE include)
target_link_libraries(autoopt INTERFACE Eigen3::Eigen)
find_package(Python 3.13 COMPONENTS Interpreter Development.Module REQUIRED)
execute_process(
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
find_package(nanobind CONFIG REQUIRED)
file(GLOB_RECURSE SOURCES src/*.cpp)
add_library(autoopt STATIC ${SOURCES})
target_include_directories(autoopt PUBLIC include)
target_link_libraries(autoopt PUBLIC Eigen3::Eigen)
install(DIRECTORY include/autoopt DESTINATION include)
nanobind_add_module(slopefit NOMINSIZE pysrc/module.cpp)
target_link_libraries(slopefit PRIVATE autoopt)
install(TARGETS slopefit DESTINATION lib/python3.13/site-packages)
# add tests if gtest is found
find_library(GTestPackage gtest QUIET)
if(GTestPackage)