LCOV - code coverage report
Current view: top level - init - compile_descr.F90 (source / functions) Hit Total Coverage
Test: FLEUR test coverage Lines: 20 21 95.2 %
Date: 2024-04-25 04:21:55 Functions: 3 3 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------
       2             : ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany
       3             : ! This file is part of FLEUR and available as free software under the conditions
       4             : ! of the MIT license as expressed in the LICENSE file in more detail.
       5             : !--------------------------------------------------------------------------------
       6             : 
       7             : MODULE m_compile_descr
       8             : 
       9             :    IMPLICIT NONE
      10             : 
      11             : CONTAINS
      12             : 
      13          80 :    SUBROUTINE get_compile_desc_string(info)
      14             :       USE m_constants
      15             :       IMPLICIT NONE
      16             :       CHARACTER(:),ALLOCATABLE,INTENT(OUT):: info
      17             : 
      18          80 :       CHARACTER(:), ALLOCATABLE::gitdesc,githash,compile_date,compile_user,compile_host,gitbranch
      19          80 :       CHARACTER(:), ALLOCATABLE::compile_flags,link_flags
      20             : 
      21          80 :       CALL  get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host,compile_flags,link_flags)
      22             : 
      23             :       info=new_line("a")// &
      24             :             "This is FLEUR version: "//trim(version_const)//new_line("a")// &
      25             :             "FLEUR was compiled:"//new_line("a")// &
      26             :             "   at: "//TRIM(compile_date)//new_line("a")// &
      27             :             "   by: "//TRIM(compile_user)//new_line("a")// &
      28             :             "   on: "//TRIM(compile_host)//new_line("a")// &
      29             :             "Its git version is:"//new_line("a")// &
      30             :             "   described by: "//TRIM(gitdesc)//new_line("a")// &
      31             :             "   from branch:  "//trim(gitbranch)//new_line("a")// &
      32             :             "   with hash:    "//TRIM(githash)//new_LINE("a")//&
      33             :             "Compiler info:"//new_LINE("a")// &
      34             :             "   flags     :  "//TRIM(compile_flags)//new_LINE("a")//&
      35          80 :             "   link flags:  "//TRIM(link_flags)
      36             : 
      37          80 :    end SUBROUTINE get_compile_desc_string
      38             : 
      39         160 :    SUBROUTINE get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host,compile_flags,link_flags)
      40             :       IMPLICIT NONE
      41             :       CHARACTER(:),ALLOCATABLE::gitdesc,githash,compile_date,compile_user,compile_host,gitbranch,compile_flags,link_flags
      42             : 
      43             : !This file is created by cmake at time of configuration
      44             : #include "compileinfo.h"
      45             : !This file is created by cmake at time of build
      46             : #include "buildinfo.h"
      47             : 
      48         160 :       gitdesc = removenuls(gitdesc)
      49         160 :       githash = removenuls(githash)
      50         160 :       compile_date = removenuls(compile_date)
      51         160 :       compile_user = removenuls(compile_user)
      52         160 :       compile_host = removenuls(compile_host)
      53         160 :       gitbranch = removenuls(gitbranch)
      54         160 :       compile_flags = removenuls(compile_flags)
      55         160 :       link_flags = removenuls(link_flags)
      56             : 
      57             :       contains
      58             : 
      59        1280 :       function removenuls( string)
      60             :          character(len=*) :: string
      61             :          character(len=len(string)) :: removenuls
      62             : 
      63             :          integer :: pos
      64             : 
      65        1280 :          pos = index( string, achar(0) )
      66        1280 :          if ( pos > 0 ) then
      67           0 :             removenuls = string(1:pos-1)
      68             :          else
      69        1280 :             removenuls = string
      70             :          endif
      71        1280 :       end function removenuls
      72             : 
      73             :    END subroutine get_compile_desc
      74             : end MODULE m_compile_descr
      75             : 

Generated by: LCOV version 1.14