Skip to content

Commit

Permalink
modifs
Browse files Browse the repository at this point in the history
  • Loading branch information
bvarillon committed Sep 14, 2023
1 parent a5def66 commit 981268a
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,13 @@ set(VERSION "#define GIT_REV \"${GIT_REV}${GIT_DIFF}\"

if(EXISTS ${CMAKE_BINARY_DIR}/version.h)
file(READ version.h VERSION_)
message("${CMAKE_BINARY_DIR}/version.h exist")
message("${CMAKE_BINARY_DIR}/version.h exists")
else()
set(VERSION_ "")
message("${CMAKE_BINARY_DIR}/version.h doesn't exist")
message("${CMAKE_BINARY_DIR}/version.h doesn't exists")
endif()

if (NOT "${VERSION}" STREQUAL "${VERSION_}")
file(WRITE ${CMAKE_BINARY_DIR}/version.h "${VERSION}")
message("new version detected")
endif()

if(EXISTS ${CMAKE_BINARY_DIR}/version.h)
file(READ version.h VERSION_)
message("${CMAKE_BINARY_DIR}/version.h exist")
else()
set(VERSION_ "")
message("${CMAKE_BINARY_DIR}/version.h doesn't exist")
endif()
endif()

0 comments on commit 981268a

Please sign in to comment.