Skip to content

Add explicit GSL support

Stefano Corda requested to merge gsl into main

This MR adds explicit support for the GSL library in the radler CMakeLists.txt. This solution solves a build issue on various systems (CSCS, EPFL ...).

When installing radler as a standalone library (not building WSClean), the CMakeLists.txt finds GSL:

-- Found GSL: /users/scorda/spack940/opt/spack/cray-cnl7-haswell/gcc-9.3.0/gsl-2.7.1-fbkto3urzy3kepm5flhvkgy4ek3uler3/include (found version “2.7.1"

However, during the build phase it fails with the following issue:

[ 56%] Building CXX object cpp/CMakeFiles/radler.dir/algorithms/ls_deconvolution.cc.o
/users/scorda/radler/cpp/algorithms/ls_deconvolution.cc:5:10: fatal error: gsl/gsl_vector.h: No such file or directory
 #include <gsl/gsl_vector.h>
          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [cpp/CMakeFiles/radler.dir/build.make:160: cpp/CMakeFiles/radler.dir/algorithms/ls_deconvolution.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:231: cpp/CMakeFiles/radler.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

This problem does not arise in DAS-6, because CMake finds the GSL header in /usr/include/gsl/.

Merge request reports

Loading