refactor version

This commit is contained in:
Scott E. Graves 2024-06-03 15:05:59 -05:00
parent 83ba09dba0
commit 5ce91ebc95
4 changed files with 12 additions and 3 deletions

1
.gitignore vendored
View File

@ -32,5 +32,6 @@ examples/strdiff_cp
examples/strdiff_storage
examples/unidiff
examples/unistrdiff
include/dtl/variables.hpp
test/*/*/*_
test/strdiff3_test

View File

@ -1,9 +1,11 @@
cmake_minimum_required(VERSION 3.20)
cmake_policy(SET CMP0048 NEW)
set(DTL_VERSION 2.01)
project(
dtl
VERSION 1.21
VERSION ${DTL_VERSION}
)
include(CheckIncludeFile)
@ -18,6 +20,12 @@ if(HAVE_UNISTD_H)
add_definitions(-DHAVE_UNISTD_H)
endif()
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/include/dtl/variables.hpp.in
${CMAKE_CURRENT_SOURCE_DIR}/include/dtl/variables.hpp
@ONLY
)
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include)
option(DTL_ENABLE_TESTING "Enable DTL unit tests" OFF)

View File

@ -13,7 +13,7 @@
* pr: initialize variables
* https://github.com/cubicdaiya/dtl/pull/16
* 1.21 released
* 2.01 released
2022-04-11 Tatsuhiko Kubo <cubicdaiya@gmail.com>

View File

@ -63,7 +63,7 @@ using std::vector;
/**
* version string
*/
const string version = "1.21";
const string version = "@DTL_VERSION@";
/**
* type of edit for SES