24 lines
498 B
CMake
24 lines
498 B
CMake
cmake_minimum_required(VERSION 4.0)
|
|
|
|
project(autoopt)
|
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
|
|
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)
|
|
|
|
install(DIRECTORY include/autoopt DESTINATION include)
|
|
|
|
# add tests if gtest is found
|
|
find_library(GTestPackage gtest QUIET)
|
|
if(GTestPackage)
|
|
enable_testing()
|
|
add_subdirectory(tests)
|
|
endif()
|
|
|