Skip to content

Commit

Permalink
release version
Browse files Browse the repository at this point in the history
  • Loading branch information
tpesout committed Mar 29, 2021
1 parent 764fde5 commit ea184a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -DNDEBUG -std=gnu99 -D_GNU_SOURCE -D_XOP
project(marginPhase LANGUAGES C)

# configure a header file to pass some of the CMake settings
set(MARGIN_VERSION_MAJOR 2)
set(MARGIN_VERSION_MINOR 1)
execute_process(
COMMAND git log -1 --format=%h
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_COMMIT_HASH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(MARGIN_VERSION_MAJOR 2)
set(MARGIN_VERSION_MINOR 2)
#set(MARGIN_VERSION_COMMIT dev-${GIT_COMMIT_HASH})
set(MARGIN_VERSION_COMMIT 0)
configure_file(
"${PROJECT_SOURCE_DIR}/inc/marginVersion.h.in"
"${PROJECT_SOURCE_DIR}/inc/marginVersion.h"
Expand Down
4 changes: 1 addition & 3 deletions inc/marginVersion.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#ifndef MARGIN_VERSION_H

//#define MARGIN_POLISH_VERSION_H "@MARGIN_VERSION_MAJOR@.@[email protected]"
#define MARGIN_POLISH_VERSION_H "@MARGIN_VERSION_MAJOR@.@[email protected]@GIT_COMMIT_HASH@"

#define MARGIN_POLISH_VERSION_H "@MARGIN_VERSION_MAJOR@.@MARGIN_VERSION_MINOR@.@MARGIN_VERSION_COMMIT@"

#endif //MARGIN_VERSION_H

0 comments on commit ea184a6

Please sign in to comment.