Closed miroi closed 9 years ago
Difficult to say why it does not work without seeing the actual code.
Strange, that the CMAKE_Fortran_FLAGS variable is already empty in https://github.com/scisoft/autocmake/blob/master/compilers/GNU.Fortran.cmake#L3 . This is what printout says (I have CMake 2.8.12.2).
I think this is not strange. What flags do you expect to see there?
I would welcome to see the employed flags;
for example, here it is "-O3 -funroll-all-loops" , but these are release-flags.
[ 50%] Building Fortran object src/CMakeFiles/example.dir/example.F90.o
cd /home/milias/Work/qch/software/software_projects/mathlibs-tester_devel/mathlibs-tester_devel/build/src && /usr/bin/gfortran -DHAVE_MKL_BLAS -DHAVE_MKL_LAPACK -O3 -funroll-all-loops -J../modules -I/home/milias/Work/qch/software/software_projects/mathlibs-tester_devel/mathlibs-tester_devel/build/modules -I/home/milias/Work/qch/software/software_projects/mathlibs-tester_devel/mathlibs-tester_devel/build -c /home/milias/Work/qch/software/software_projects/mathlibs-tester_devel/mathlibs-tester_devel/src/example.F90 -o CMakeFiles/example.dir/example.F90.o
I found here this receipe to preserve flags, will try it: http://www.cmake.org/pipermail/cmake/2013-August/055473.html
Well, receipe is not working ... default flags are empty.
Since I cannot see your code I cannot comment on why it fails. Normally it should work.
Code is here: https://github.com/miroi/mathlibs-tester
CDash outputs: https://testboard.org/cdash/index.php?project=MathLibs-tester
And where can I see or find the print statement which fails?
Hi,
the statemenet is here : https://github.com/miroi/mathlibs-tester/blob/master/cmake/custom/build_info.cmake#L63
But you can check it simply by putting simple printout message into https://github.com/miroi/mathlibs-tester/blob/master/cmake/downloaded/autocmake_GNU.Fortran.cmake
or directly into the autocmake's module, https://github.com/scisoft/autocmake/blob/master/compilers/GNU.Fortran.cmake
I think later, we should introduce the test for _buildinfo printouts, similar to existing fc_git_info. M.
In this project you use https://github.com/scisoft/autocmake/blob/master/compilers/GNU.Fortran.cmake as far as I can see. And there are no flags. So I don't understand what does not work. I would expect to see no flags in your printout as well.
In such case I would be glad to print out used flags, like we had in DIRAC (for example, see https://testboard.org/cdash/buildSummary.php?buildid=21237 ).
The command "make VERBOSE=1" does show used flags (see https://github.com/scisoft/autocmake/issues/131#issuecomment-140412788) , how to get them printed ?
What you see printed there is CMAKE_Fortran_FLAGS_RELEASE
. So you just need to print the right variables. Perhaps you want to print all of them. I am now closing this issue since this is now clearly not an Autocmake issue.
Yes, the best would be printing all flags associated with the given compiler/linker, but the art ("science") is to find proper CMake variable(s) for that printing. I can't find them...do they exist ?
thanks; this helps only partially....
Please tell me what is not clear yet.
Well, simply I can not get all what I want;
GNU does not have compiler flags set: https://testboard.org/cdash/buildSummary.php?buildid=32922
while PGI has some setting: https://testboard.org/cdash/buildSummary.php?buildid=32963
I think I can not get more from CMake, this should be sufficient; together with printing out git_info data.
You write that you cannot get all what you want. What is it that you want?
I wanted the full string of compilation flags/preprocessor etc as are shown with the make VERBOSE=1 command, see https://github.com/scisoft/autocmake/issues/131#issuecomment-140412788 .
Maybe I can get something more, I 'll play with printouts a liitle.
The full string is a combination of several variables: CMAKE_Fortran_FLAGS, CMAKE_Fortran_FLAGS_RELEASE or CMAKE_Fortran_FLAGS_DEBUG (depending on whether it's release or debug), and preprocessing definitions.
Yes, plus user extra compilers flags might be there.
To have more complex ground for the development of the _buildinfo custom module, I'll move to dedicated DIRAC branch. There I can explore more possibilities and pick the best for CMake/dirac.x print-outs.
When printing CMAKE_Fortran_FLAGS, I see they are empty (see https://testboard.org/cdash/buildSummary.php?buildid=32904 ).
However, they are appearing in the compiling command of cmake, what is correct. Any help how to fill this variable in autocmake module(s) ?