From: Matthias Maier Date: Thu, 1 Dec 2022 05:45:52 +0000 (-0600) Subject: CMake: query git information at right time X-Git-Tag: v9.5.0-rc1~446^2~23 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ce51a49116e637fdac777c6b5a46698542d340c;p=dealii.git CMake: query git information at right time --- diff --git a/cmake/config/Config.cmake.in b/cmake/config/Config.cmake.in index c5d2b919a3..d5f1dac564 100644 --- a/cmake/config/Config.cmake.in +++ b/cmake/config/Config.cmake.in @@ -20,7 +20,6 @@ ## ## ######################################################################## - # # General information # @@ -45,7 +44,6 @@ set(DEAL_II_PROJECT_CONFIG_NAME "@DEAL_II_PROJECT_CONFIG_NAME@") set(DEAL_II_BUILD_TYPE "@CMAKE_BUILD_TYPE@") set(DEAL_II_BUILD_TYPES "@DEAL_II_BUILD_TYPES@") - # # Information about the project location # @@ -90,7 +88,6 @@ if(NOT ${DEAL_II_PACKAGE_NAME}_FIND_QUIETLY) endif() endif() - # # Include all convenience macros: # @@ -105,7 +102,6 @@ foreach(file ${_macro_files}) include(${file}) endforeach() - # # Compiler and linker configuration # @@ -140,7 +136,6 @@ set(DEAL_II_MPIEXEC_NUMPROC_FLAG "@MPIEXEC_NUMPROC_FLAG@") set(DEAL_II_MPIEXEC_PREFLAGS "@MPIEXEC_PREFLAGS@") set(DEAL_II_MPIEXEC_POSTFLAGS "@MPIEXEC_POSTFLAGS@") - # # Information about library targets and feature configuration # diff --git a/cmake/setup_finalize.cmake b/cmake/setup_finalize.cmake index 090c262da7..6ab2f2890f 100644 --- a/cmake/setup_finalize.cmake +++ b/cmake/setup_finalize.cmake @@ -70,3 +70,24 @@ endforeach() file(REMOVE ${CMAKE_BINARY_DIR}/${DEAL_II_PROJECT_CONFIG_RELDIR}/${DEAL_II_PROJECT_CONFIG_NAME}Targets.cmake ) + + +######################################################################## +# # +# Query for git repository information: # +# # +######################################################################## + +deal_ii_query_git_information("DEAL_II") + +file(WRITE ${CMAKE_BINARY_DIR}/revision.log +"### +# +# Git information: +# Branch: ${DEAL_II_GIT_BRANCH} +# Revision: ${DEAL_II_GIT_REVISION} +# Timestamp: ${DEAL_II_GIT_TIMESTAMP} +# +###" + ) + diff --git a/cmake/setup_write_config.cmake b/cmake/setup_write_config.cmake index 58c6bd5995..c98b7abd7d 100644 --- a/cmake/setup_write_config.cmake +++ b/cmake/setup_write_config.cmake @@ -14,26 +14,6 @@ ## --------------------------------------------------------------------- -######################################################################## -# # -# Query for git repository information: # -# # -######################################################################## - -deal_ii_query_git_information("DEAL_II") - -file(WRITE ${CMAKE_BINARY_DIR}/revision.log -"### -# -# Git information: -# Branch: ${DEAL_II_GIT_BRANCH} -# Revision: ${DEAL_II_GIT_REVISION} -# Timestamp: ${DEAL_II_GIT_TIMESTAMP} -# -###" - ) - - ######################################################################## # # # Write a nice configuration summary to file: #