Commit 21103dc8 authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

Implement partons/core/partons#36

parent c071482b
......@@ -9,6 +9,22 @@ project(NumA++ CXX)
# define c++ standard and issue all the warning demanded by this standard
add_definitions(-std=c++98 -pedantic)
# VERSION ==================================================================================
# read file
file(READ ${CMAKE_SOURCE_DIR}/data/version.txt VERSION_STR)
# strip spaces
string(STRIP ${VERSION_STR} VERSION_STR)
# get major and minor versions
string(REGEX REPLACE "\\.[0-9]*" "" NUMA_VERSION_MAJOR ${VERSION_STR})
string(REGEX REPLACE "[0-9]*\\." "" NUMA_VERSION_MINOR ${VERSION_STR})
# configure
configure_file(${CMAKE_SOURCE_DIR}/cmake/Version/NumAVersion.h_in ${CMAKE_SOURCE_DIR}/include/NumA/NumAVersion.h)
# AUTOMOC ==================================================================================
# tell cmake to run Qt moc when necessary
......
/**
* @file NumAVersion.h
* @author Pawel Sznajder (NCBJ, Warsaw)
* @date August 8, 2017
* @version 1.0
*
* This file is used to define NumA++ version number and it is set by CMake.
*/
#define NUMA_VERSION(major,minor) (((major) << 8) + (minor))
#define NUMA_VERSION_MAJOR @NUMA_VERSION_MAJOR@
#define NUMA_VERSION_MINOR @NUMA_VERSION_MINOR@
\ No newline at end of file
1.0
\ No newline at end of file
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