Skip to content
Snippets Groups Projects
Unverified Commit 3f3cd9f9 authored by Sam Yates's avatar Sam Yates Committed by GitHub
Browse files

Bump version post 0.1 for development. (#623)

cf. CMake issue 16716: https://gitlab.kitware.com/cmake/cmake/issues/16716

* Bump version post 0.1 for development.
* Read version string from file VERSION.
* Strip suffix to make a numerical, CMake-compatible PROJECT_VERSION.
parent 28e45aee
No related branches found
No related tags found
No related merge requests found
# 3.8 requirement for CUDA language support.
cmake_minimum_required(VERSION 3.8)
project(arbor VERSION 0.1)
file(READ VERSION FULL_VERSION_STRING)
string(STRIP "${FULL_VERSION_STRING}" FULL_VERSION_STRING)
string(REGEX MATCH "^[0-9]+(\\.[0-9]+)?(\\.[0-9]+)?(\\.[0-9]+)?" numeric_version "${FULL_VERSION_STRING}")
project(arbor VERSION ${numeric_version})
enable_language(CXX)
#----------------------------------------------------------
# Configure-time build options for Arbor:
#----------------------------------------------------------
......
0.1.1-dev
......@@ -46,7 +46,7 @@ endif()
add_custom_command(
OUTPUT version.hpp-test
DEPENDS _always_rebuild
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/git-source-id ${PROJECT_VERSION} ${arb_features} > version.hpp-test
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/git-source-id ${FULL_VERSION_STRING} ${arb_features} > version.hpp-test
)
set(version_hpp_path arbor/version.hpp)
......
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