rework
This commit is contained in:
32 files changed
+75060
-630
No files matched your search
+19
-5
@@ -1,9 +1,11 @@
|
||||
cmake_minimum_required(VERSION 4.0)
|
||||
|
||||
project(slopefit)
|
||||
|
||||
set(CMAKE_C_COMPILER clang)
|
||||
set(CMAKE_CXX_COMPILER clang++)
|
||||
set(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
project(slopefit)
|
||||
|
||||
add_compile_options(-Wall -Werror -Wpedantic)
|
||||
|
||||
find_package(Eigen3 REQUIRED)
|
||||
@@ -20,15 +22,27 @@ file(GLOB_RECURSE SOURCES lib/*.cpp)
|
||||
add_library(autoopt STATIC ${SOURCES})
|
||||
target_include_directories(autoopt PUBLIC include)
|
||||
target_link_libraries(autoopt PUBLIC Eigen3::Eigen)
|
||||
target_link_libraries(autoopt PRIVATE fftw3)
|
||||
|
||||
nanobind_add_module(slopefit NOMINSIZE src/module.cpp)
|
||||
nanobind_add_stub(
|
||||
slopefit_stub
|
||||
MODULE slopefit
|
||||
OUTPUT slopefit.pyi
|
||||
PYTHON_PATH $<TARGET_FILE_DIR:slopefit>
|
||||
DEPENDS slopefit
|
||||
)
|
||||
|
||||
target_link_libraries(slopefit PRIVATE autoopt)
|
||||
install(TARGETS slopefit DESTINATION slopefit)
|
||||
install(TARGETS slopefit DESTINATION .)
|
||||
install(FILES $<TARGET_FILE_DIR:slopefit>/slopefit.pyi DESTINATION .)
|
||||
|
||||
# add tests if gtest is found
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
|
||||
find_library(GTestPackage gtest QUIET)
|
||||
if(GTestPackage)
|
||||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user