2023-03-17 20:29:20 +01:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
|
|
|
|
|
|
project(CubicLagrangeMinimize)
|
|
|
|
|
|
|
|
|
|
# Set the C++ standard to C++11
|
|
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
|
|
|
|
|
|
# Find the Eigen library
|
|
|
|
|
find_package(Eigen3 REQUIRED)
|
2023-03-18 10:28:17 +01:00
|
|
|
include_directories(${EIGEN3_INCLUDE_DIRS} include)
|
2023-03-17 20:29:20 +01:00
|
|
|
|
|
|
|
|
# Add the source files
|
|
|
|
|
set(SOURCES
|
|
|
|
|
src/tests.cpp
|
|
|
|
|
src/CubicLagrangeMinimize.cpp
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
# Add an executable target
|
|
|
|
|
add_executable(CubicLagrangeMinimize ${SOURCES})
|
|
|
|
|
|
|
|
|
|
# Link against the Eigen library
|
|
|
|
|
target_link_libraries(CubicLagrangeMinimize Eigen3::Eigen)
|