subsurface/cmake/Modules/HandleVersionGeneration.cmake
Dirk Hohndel 2882a1ef41 Remove the non-canonical Subusrface version
It no longer makes sense to lie about the version. If you are running a product
build, then the canonical version is the same version as the plain version used
to be. And in either case it makes much more sense to simply log the full
version information.

We used to have the differently styled versions for different OSs, but I don't
think this is needed anymore. Let's hope this doesn't go down as one of these
"famous last words" moments...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-20 07:59:50 -08:00

18 lines
590 B
CMake

# Generate the ssrf-config.h every 'make'
file(WRITE ${CMAKE_BINARY_DIR}/version.h.in
"#define GIT_VERSION_STRING \"@GIT_VERSION_STRING@\"
#define CANONICAL_VERSION_STRING \"@CANONICAL_VERSION_STRING@\"
")
file(COPY cmake/Modules/version.cmake
DESTINATION ${CMAKE_BINARY_DIR})
add_custom_target(
version ALL COMMAND ${CMAKE_COMMAND}
-D SRC=${CMAKE_BINARY_DIR}/version.h.in
-D DST=${CMAKE_BINARY_DIR}/ssrf-version.h
-D CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}
-D CMAKE_TOP_SRC_DIR=${CMAKE_SOURCE_DIR}
-D CMAKE_BINARY_DIR=${CMAKE_BINARY_DIR}
-P ${CMAKE_BINARY_DIR}/version.cmake
)