Commit ac182b4d authored by Pawel Sznajder's avatar Pawel Sznajder
Browse files

Implement partons/core/partons#36

parent 538d3497
...@@ -9,6 +9,21 @@ project(ElementaryUtils CXX) ...@@ -9,6 +9,21 @@ project(ElementaryUtils CXX)
# define c++ standard and issue all the warning demanded by this standard # define c++ standard and issue all the warning demanded by this standard
add_definitions(-std=c++98 -pedantic) 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]*" "" ELEMENTARY_UTILS_VERSION_MAJOR ${VERSION_STR})
string(REGEX REPLACE "[0-9]*\\." "" ELEMENTARY_UTILS_VERSION_MINOR ${VERSION_STR})
# configure
configure_file(${CMAKE_SOURCE_DIR}/cmake/Version/ElementaryUtilsVersion.h_in ${CMAKE_SOURCE_DIR}/include/ElementaryUtils/ElementaryUtilsVersion.h)
# AUTOMOC ================================================================================== # AUTOMOC ==================================================================================
# tell cmake to run Qt moc when necessary # tell cmake to run Qt moc when necessary
......
/**
* @file ElementaryUtilsVersion.h
* @author Pawel Sznajder (NCBJ, Warsaw)
* @date August 8, 2017
* @version 1.0
*
* This file is used to define ElementaryUtils version number and it is set by CMake.
*/
#define ELEMENTARY_UTILS_VERSION(major,minor) (((major) << 8) + (minor))
#define ELEMENTARY_UTILS_VERSION_MAJOR @ELEMENTARY_UTILS_VERSION_MAJOR@
#define ELEMENTARY_UTILS_VERSION_MINOR @ELEMENTARY_UTILS_VERSION_MINOR@
\ No newline at end of file
/ElementaryUtilsVersion.h
Supports Markdown
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