Skip to content

Commit

Permalink
Fix Issue #487
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Jan 28, 2024
1 parent eb29d82 commit 8caab2f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
18 changes: 10 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,16 @@ else( CMAKE_SIZEOF_VOID_P EQUAL 8 )
add_definitions("-DTFEL_ARCH32")
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 )

#extraction svn revision
if(NOT TFEL_SVN_REVISION)
execute_process(COMMAND svnversion
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}"
OUTPUT_VARIABLE TFEL_SVN_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif(NOT TFEL_SVN_REVISION)
add_definitions("-DTFEL_SVN_REVISION=\\\"\"${TFEL_SVN_REVISION}\"\\\"")
#extraction git hash
if(NOT TFEL_GIT_HASH)
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE TFEL_GIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE)
message("Abbreviated commit hash: ${TFEL_GIT_HASH}")
endif(NOT TFEL_GIT_HASH)
add_definitions("-DTFEL_GIT_HASH=\\\"\"${TFEL_GIT_HASH}\"\\\"")
add_definitions("-DTFEL_CMAKE_GENERATOR=\\\"\"${CMAKE_GENERATOR}\"\\\"")

# testing
Expand Down
4 changes: 4 additions & 0 deletions docs/web/release-notes-3.0.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ eqnPrefixTemplate: "($$i$$)"

# Issues fixed

# Issue 87: [tfel-config] remove reference to svn revision

For more details, see <https://github.com/thelfer/tfel/issues/487>.

# Issue 466: Fix build with gcc 13

For more details, see <https://github.com/thelfer/tfel/issues/466>.
Expand Down
2 changes: 1 addition & 1 deletion tfel-config/src/tfel-config.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static void listOptions(std::ostream& os) {

[[noreturn]] static void treatVersion() {
std::cout << "tfel-config " << VERSION
<< " (svn revision : " << TFEL_SVN_REVISION << ")" << std::endl;
<< " (git hash: " << TFEL_GIT_HASH << ")" << std::endl;
std::exit(EXIT_SUCCESS);
} // end of treatHelp

Expand Down

0 comments on commit 8caab2f

Please sign in to comment.