radiasoft / zgoubi

Git repo for zgoubi source code
https://sourceforge.net/projects/zgoubi/
GNU General Public License v2.0
9 stars 3 forks source link

zgoubi compilation warnings #62

Closed robnagler closed 5 years ago

robnagler commented 5 years ago

Is it possible to reduce the number of warnings when compiling zgoubi? Also, is there a way to get cmake to stop outputting incorrect and annoying percentage lines? It makes it hard to debug real problems.

[  2%] Building Fortran object CMakeFiles/zg.dir/common/raz.f.o
/home/vagrant/src/radiasoft/codes/zgoubi-20190509.154812/zgoubi/common/raz.f:30:72:

  1      TAB(I) = 0.D0
                                                                        1
Warning: Obsolescent feature: DO termination statement which is not END DO or CONTINUE with label 1 at (1)
Warning: GNU Extension: DOUBLE COMPLEX at (1)
/home/vagrant/src/radiasoft/codes/zgoubi-20190509.154812/zgoubi/zgoubi/coupling/libraries/libinv/BLAS/zgeru.f:7:20:

       DOUBLE COMPLEX A(LDA,*),X(*),Y(*)
                    1
zbeekman commented 5 years ago

Hi Rob,

My typical invocation of make with CMake projects looks something like this:

make -j $(nproc) || make VERBOSE=1

Setting VERBOSE=1 will show you the underlying commands that the makefile is executing to build the project, and the error will be the most recent output on the terminal.

If you really want to disable the progress messages, that is controlled by a global property, RULE_MESSAGES that defaults to ON. You can run CMake with the additional flag -DCMAKE_RULE_MESSAGES:BOOL=OFF which will disable these progress messages.

As far as the compiler warning messages they are useful for identifying usage of deprecated language features and suspicious usage, but those are controlled by the -Wall compiler flag passed to GFortran. You can remove it from the top level CMakeLists.txt. In the future work we can improve how compilation options are handled.

robnagler commented 5 years ago

Thanks @zbeekman! Just what I needed.