-
Notifications
You must be signed in to change notification settings - Fork 6
Description
(Re-opened from wrongly posted for FLAP)
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):
- The first problem I get here, is when i use
git submodule add https://github.com/szaghi/FiNeR.gitand thengit submodule update --init --recursiveit already fails when it wants to clone thefortran_testerthird party programme. Here I think the problem is an old URL in the.gitmodulefile (at the moment:[email protected]:pdebuyl/fortran_tester.git; but should behttps://github.com/pdebuyl/fortran_testerperhaps). - 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_testerpackage. - Later, unfortunately this fails either with
No content details recorded for FiNeRorFailed 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.