Relative Content

Tag Archive for c++cmakesundials

CMake not linking to SUNDIALS targets. Why is CMake unable to find the SUNDIALS libraries?

I am trying to build pion using a CMake style build system. The only problem is the grid simulation modules(pion-ng,pion-ug,icgen-ng,icgen-ug) are unable to link to the SUNDIALS(VER 7.1.1) functions although CMake(VER 3.2.2.1) correctly does find my SUNDIALS installation but doesn’t link to it.
In the CMakeLists.txt file at /pion/ I use find_package(SUNDIALS REQUIRED) and set the -DCMAKE_PREFIX_PATH to /sundials/install/ and add the flag -DCMAKE_CXX_FLAGS="-I/mnt/e/sundials/install/include" (without explicitly adding this flag, CMake does not detect the header files).
My CMakeLists.txt file at /pion/source attempts to link like this: