Closed zbeekman closed 9 years ago
The problem of the broken Makefile and FoBiS.py not building the library still exists, but I figured out the source of the errors when using CMake… there is a gfortran work around that needs to be enabled with -DGNU
… there’s a better way to do this, see here: http://fortranwiki.org/fortran/show/Predefined+preprocessor+macros
Basically you don’t need to pass a user definition to let the source code know which compiler is building it; compilers already include predefined macros to do this. I’ll work up a PR to eliminate this from FLAP which will make it a little bit more robust.
@zbeekman
It is probably fobos to have not up-to-date contents for building the library (in yhe last weeks I build only the drivers).
Thanks for the PR. By the next hours I will merge your PR and correct the fobos.
Got it. The fobos file had still the .f90
extension for the library that is now .F90
.
The new fobos file has the correct extension.
P.S. note that the makefile provided is for only Test_Driver program: FoBiS.py does not support the production of makefile for building libraries (a new feature request about this on FoBiS.py is now open).
Great, thanks so much for fixing this!
If you are interested, I can try to create a CMake script to compile the FLAP library and executables as two separate targets. This option could coexist with the FoBoS script. What do you think?
Hi victor,
thank you very much. Yes it is useful.
P.S. the next week our lib will progress...
I’m not sure there is a need to maintain an additional build script, but it’s up to you and Stefano. I am adding FLAP to my project with CMake already and it is very easy to just tell CMake to compile a library from the two source files.
@szaghi thanks for fixing the fobos file. If I had noticed the filename extensions issue I would have included it in my PR…
On Fri, Jun 26, 2015 at 7:56 AM victorsndvg notifications@github.com wrote:
If you are interested, I can try to create a CMake script to compile the FLAP library and executables as two separate targets. This option could coexist with the FoBoS script. What do you think?
— Reply to this email directly or view it on GitHub https://github.com/szaghi/FLAP/issues/34#issuecomment-115655436.
@zbeekman do not worry. Let me know about the --
option
I’m trying to integrate this with my project but I am having some issues.
If I try to build with fobos nothing happens. I’m not sure if this is an issue with the fobos file or with FoBiS.py:
If I try to build with the included Makefile I get errors: https://gist.github.com/zbeekman/5be2392f0fe05ddcaaa4
If I tell CMake where the
Data_Type_Command_Line_Interface.F90
andIR_Precision.F90
files are and try to let CMake’s dependency resolution handle everything else, I get a catastrophic compiler error with gfortran 5.1: