summaryrefslogtreecommitdiffstats
path: root/libccnx-common/cmake/Modules/version.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'libccnx-common/cmake/Modules/version.cmake')
-rw-r--r--libccnx-common/cmake/Modules/version.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/libccnx-common/cmake/Modules/version.cmake b/libccnx-common/cmake/Modules/version.cmake
new file mode 100644
index 00000000..74831674
--- /dev/null
+++ b/libccnx-common/cmake/Modules/version.cmake
@@ -0,0 +1,15 @@
+#
+# Get a version to pass on the command line
+#
+execute_process(COMMAND ${PROJECT_SOURCE_DIR}/cmake/get_version.sh ${PROJECT_SOURCE_DIR}
+ OUTPUT_VARIABLE RELEASE_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+execute_process(COMMAND date -u +%Y-%m-%dT%H:%M:%SZ
+ OUTPUT_VARIABLE ISO_DATE
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+MESSAGE( STATUS "Configuring version ${RELEASE_VERSION}" )
+
+add_definitions("-DRELEASE_VERSION=\"${RELEASE_VERSION}\"")
+