From e422b65d12d76d830bf0af677bb761fdd6f73c02 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Fri, 1 Nov 2024 11:49:36 -0400 Subject: [PATCH] Fix to CMakeLists - added gsl. --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 06bea7675..1206d3bda 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,6 +111,12 @@ else() message(STATUS "Boost include dirs are ${Boost_INCLUDE_DIRS}") endif() +find_package(GSL) +if(GSL_FOUND) + message(STATUS "GSL version is ${GSL_VERSION}") + message(STATUS "GSL include dirs are ${GSL_INCLUDE_DIR}") +endif() + # add_subdirectory(thirdparty/pybind11) add_subdirectory(thirdparty/fmt EXCLUDE_FROM_ALL) set(XTENSOR_USE_OPENMP 0) @@ -147,6 +153,9 @@ if(OpenMP_CXX_FOUND) target_link_libraries(${PROJECT_NAME} PRIVATE OpenMP::OpenMP_CXX) endif() +target_include_directories(${PROJECT_NAME} PRIVATE ${GSL_INCLUDE_DIR}) +target_link_libraries(${PROJECT_NAME} PRIVATE ${GSL_LIBRARIES}) + add_executable(profiling EXCLUDE_FROM_ALL src/profiling/profiling.cpp src/simsoptpp/biot_savart_c.cpp src/simsoptpp/biot_savart_vjp_c.cpp src/simsoptpp/regular_grid_interpolant_3d_c.cpp) set_target_properties(profiling PROPERTIES