I recently started using Fortran for a project and stumbled across your libraries, especially FiNeR (and maybe in the future I'll use FLAP as well).
At the moment, the project is managed with cmake (v3.17) and I have trouble using FiNeR in my project. I tried it two ways:
a) via add_subdirectory (which is advised in your file headers):
The first problem I get here, is when i use git submodule add https://github.com/szaghi/FiNeR.git and then git submodule update --init --recursive it already fails when it wants to clone the fortran_tester third party programme. Here I think the problem is an old URL in the .gitmodule file (at the moment: git@github.com:pdebuyl/fortran_tester.git; but should be https://github.com/pdebuyl/fortran_tester perhaps).
The second problem is, that cmake (here I am not an expert) somehow does not like your namespaces. Either it has problem with the double colons or the names itself.
If I do manual changes to your code (manually copying the fortran_tester, changing all namespaces from :: to -), I get it working.
So here my question is, if I use your library wrongly in cmake, or if it is just not yet applicable to newer cmake versions?
b) via FetchContent:
This was also new for me, but I saw that cmake has this feature in newer versions to download/compile/include external programmes/libraries during the build process. Hence no third_party directory or similar is needed. Which I find very attractive.
Here there is the same problem with the fortran_tester package.
Later, unfortunately this fails either with No content details recorded for FiNeR or Failed to get the hash for HEAD.
Do you have an idea how to solve these problem? Perhaps also someone else with more cmake experience has an idea. As I said, I'm also no expert in this field.
Best regards!
EDIT:
For my way of doing it b)
I proceeded a little bit more, but latest now I am also stuck on the namespace problem.
The error message is (but not only for the fortran_tester):
The target name "fortran_tester::doc" is reserved or not valid for certain
CMake features, such as generator expressions, and may result in undefined
behavior.
Dear @szaghi,
I recently started using Fortran for a project and stumbled across your libraries, especially FiNeR (and maybe in the future I'll use FLAP as well).
At the moment, the project is managed with cmake (v3.17) and I have trouble using FiNeR in my project. I tried it two ways:
a) via
add_subdirectory
(which is advised in your file headers):git submodule add https://github.com/szaghi/FiNeR.git
and thengit submodule update --init --recursive
it already fails when it wants to clone thefortran_tester
third party programme. Here I think the problem is an old URL in the.gitmodule
file (at the moment:git@github.com:pdebuyl/fortran_tester.git
; but should behttps://github.com/pdebuyl/fortran_tester
perhaps).b) via
FetchContent
:fortran_tester
package.No content details recorded for FiNeR
orFailed to get the hash for HEAD
.Do you have an idea how to solve these problem? Perhaps also someone else with more
cmake
experience has an idea. As I said, I'm also no expert in this field.Best regards!
EDIT: For my way of doing it b) I proceeded a little bit more, but latest now I am also stuck on the namespace problem. The error message is (but not only for the
fortran_tester
):