Commit 271de2a3 authored by Daniel Wortmann's avatar Daniel Wortmann

Small change to include compiler and linker flags into output files

parent effa3396
......@@ -21,4 +21,4 @@ string(STRIP ${git_hash} git_hash)
string(STRIP ${git_describe} git_describe)
string(STRIP ${git_branch} git_branch)
file(GENERATE OUTPUT ${CMAKE_SOURCE_DIR}/init/compileinfo.h CONTENT "gitdesc=\"${git_describe}\"\ncompile_date=\"${compile_time}\"\ncompile_user=\"${compile_user}\"\ncompile_host=\"${compile_host}\"\ngitbranch=\"${git_branch}\"\ngithash=\"${git_hash}\"\n")
file(GENERATE OUTPUT ${CMAKE_SOURCE_DIR}/init/compileinfo.h CONTENT "gitdesc=\"${git_describe}\"\ncompile_date=\"${compile_time}\"\ncompile_user=\"${compile_user}\"\ncompile_host=\"${compile_host}\"\ngitbranch=\"${git_branch}\"\ngithash=\"${git_hash}\"\ncompile_flags=\"${CMAKE_Fortran_FLAGS}\"\nlink_flags=\"${FLEUR_LIBRARIES}\"\n")
......@@ -16,8 +16,8 @@ MODULE m_compile_descr
CHARACTER(LEN=*),INTENT(OUT):: info
CHARACTER(len=50)::gitdesc,githash,compile_date,compile_user,compile_host,gitbranch
call get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host)
CHARACTER(len=50)::compile_flags,link_flags
CALL get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host,compile_flags,link_flags)
info=new_line("a")// &
"This is FLEUR version: "//trim(version_const)//new_line("a")// &
"FLEUR was compiled:"//new_line("a")// &
......@@ -27,13 +27,16 @@ MODULE m_compile_descr
"Its git version is:"//new_line("a")// &
" described by: "//TRIM(gitdesc)//new_line("a")// &
" from branch: "//trim(gitbranch)//new_line("a")// &
" with hash: "//TRIM(githash)
" with hash: "//TRIM(githash)//new_LINE("a")//&
"Compiler info:"//new_LINE("a")// &
" flags : "//TRIM(compile_flags)//new_LINE("a")//&
" link flags: "//TRIM(link_flags)
end SUBROUTINE get_compile_desc_string
SUBROUTINE get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host)
SUBROUTINE get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host,compile_flags,link_flags)
IMPLICIT NONE
CHARACTER(LEN=*),INTENT(OUT)::gitdesc,githash,compile_date,compile_user,compile_host,gitbranch
CHARACTER(LEN=*),INTENT(OUT)::gitdesc,githash,compile_date,compile_user,compile_host,gitbranch,compile_flags,link_flags
!This file is created by cmake at time of configuration
#include "compileinfo.h"
......
......@@ -65,6 +65,7 @@ MODULE m_xmlOutput
CHARACTER(LEN=9) :: flags(11)
CHARACTER(LEN=20) :: structureSpecifiers(11)
CHARACTER(LEN=50) :: gitdesc,githash,gitbranch,compile_date,compile_user,compile_host
CHARACTER(LEN=50) :: compile_flags,link_flags
maxNumElements = 10
ALLOCATE(elementList(maxNumElements))
......@@ -82,8 +83,8 @@ MODULE m_xmlOutput
WRITE (xmlOutputUnit,'(a)') '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
WRITE (xmlOutputUnit,'(a)') '<fleurOutput fleurOutputVersion="0.27">'
CALL openXMLElement('programVersion',(/'version'/),(/version_const/))
CALL get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host)
CALL writeXMLElement('compilationInfo',(/'date','user','host'/),(/compile_date,compile_user,compile_host/))
CALL get_compile_desc(gitdesc,githash,gitbranch,compile_date,compile_user,compile_host,compile_flags,link_flags)
CALL writeXMLElement('compilationInfo',(/'date','user','host','flag','link'/),(/compile_date,compile_user,compile_host,compile_flags,link_flags/))
CALL writeXMLElement('gitInfo',(/'version ','branch ','lastCommitHash'/),(/gitdesc,gitbranch,githash/))
CALL getComputerArchitectures(flags, numFlags)
IF (numFlags.EQ.0) THEN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment