Commit 9810cf0f authored by Daniel Wortmann's avatar Daniel Wortmann

Update compileenv.txt

parent 248b0546
......@@ -16,9 +16,20 @@ elseif (EXISTS ${CMAKE_SOURCE_DIR}/version)
file(READ ${CMAKE_SOURCE_DIR}/version git_describe)
endif()
#normalize the strings
string(STRIP ${git_hash} git_hash)
string(STRIP ${git_describe} git_describe)
string(STRIP ${git_branch} git_branch)
#normalize the strings, fix for problems in git commands above
if (git_hash)
string(STRIP ${git_hash} git_hash)
else()
set(git_hash unkown)
endif()
if (git_describe)
string(STRIP ${git_describe} git_describe)
else()
set(git_describe unkown)
endif()
if (git_branch)
string(STRIP ${git_branch} git_branch)
else
set(git_branch unkown)
endif()
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")
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