Open vegardjervell opened 1 month ago
The approach that we have been using can be seen at https://github.com/Goddard-Fortran-Ecosystem/GFE
Unfortunately, I don't have time at the moment to drill down to see just what is different from your approach, if any. But I will add that supporting variant ways to include pFUnit has been rather expensive in terms of maintenance costs. Hopefully you've latched onto something that is already supported.
Cheers.
(notifying @mathomp4)
As @tclune says, GFE essentially does use git submodules and add_subdirectory()
. So we do a git clone
and git submodule update --init
say.
I will say I have thought at some point to look at CPM.cmake where with the right setup you could do:
CPMAddPackage("gh:Goddard-Fortran-Ecosystem/pFUnit@x.y.z")
It seemed clever, but I've never had time to try it out...
Thanks! It looks like I've done pretty much the same as what you're doing. The trouble I was having was related to some compiler flags I was setting for my library that didn't play nicely with pFUnit
, mostly as a result of my own inexperience with cmake
. Regardless, it could be helpful to have an example here showing how it can be done properly for future reference.
I'll put up a PR with my working example in case it can be helpful for someone else, and you can do as you like with it, including postponing looking at it for however long you want ;)
Hi,
We've been using
pFUnit
for some time for a library, and have been building the test suite withmake
. I'm working on a build system usingcmake
now, and I had some trouble getting the test suite to build when I includepFUnit
usingadd_subdirectory
, which I would like to do so that I could set uppFUnit
as a git submodule in our project and more easily run fully automated building/testing. An example here of how you would set that up would be greatly appreciated!I eventually got a working solution together, and put up a minimal example here. Feel free to use that however you wish :)