Commit bc0c341c authored by Chris Cantwell's avatar Chris Cantwell

Fixed CMake to automatically extract version from the VERSION file.

parent d49e26bc
......@@ -8,9 +8,13 @@ PROJECT(Nektar++)
# Helps organize projects in IDEs.
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
SET(NEKTAR_VERSION_MAJOR 3)
SET(NEKTAR_VERSION_MINOR 2)
SET(NEKTAR_VERSION_PATCH 0)
# Extract the version number from the VERSION file and set in CMake
# The format of this file must be X.X.X
FILE(STRINGS "VERSION" NEKVER)
STRING(REPLACE "." ";" NEKVERLIST ${NEKVER})
LIST(GET NEKVERLIST 0 NEKTAR_VERSION_MAJOR)
LIST(GET NEKVERLIST 1 NEKTAR_VERSION_MINOR)
LIST(GET NEKVERLIST 2 NEKTAR_VERSION_PATCH)
SET(NEKTAR_VERSION ${NEKTAR_VERSION_MAJOR}.${NEKTAR_VERSION_MINOR}.${NEKTAR_VERSION_PATCH})
INCLUDE(CMakeExportBuildSettings)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment