libCEED icon indicating copy to clipboard operation
libCEED copied to clipboard

prototype CMake support

Open samuelpmish opened this issue 11 months ago • 3 comments

following discussion https://github.com/CEED/libCEED/discussions/1524, this PR aims to investigate feasibility of adding CMake support to libCEED.

At the time of writing, it seems to successfully compile the libCEED static library and tests, although I'm seeing some linker errors on the tests (undefined symbols from unsupported backends), but this is probably because I'm in an unfamiliar code base and don't understand how the backends are supposed to be enabled/disabled.

It also shows an example of generating files (e.g. ceed.pc) when configuring CMake.

Also included is a small example CMake project showing how a downstream user might benefit from CMake integration:

Screenshot 2024-03-20 at 10 19 34 AM

Adding a few lines of code to the CMakeLists.txt makes it possible to download, configure, build and link against libCEED.

samuelpmish avatar Mar 20 '24 17:03 samuelpmish