diff --git a/.gitignore b/.gitignore index b290779..89ab317 100644 --- a/.gitignore +++ b/.gitignore @@ -32,5 +32,6 @@ examples/strdiff_cp examples/strdiff_storage examples/unidiff examples/unistrdiff +include/dtl/variables.hpp test/*/*/*_ test/strdiff3_test diff --git a/CMakeLists.txt b/CMakeLists.txt index 42739e3..1bbb9d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/ChangeLog b/ChangeLog index 1580f34..6b2f35d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/include/dtl/variables.hpp b/include/dtl/variables.hpp.in similarity index 99% rename from include/dtl/variables.hpp rename to include/dtl/variables.hpp.in index e93f843..09621d9 100644 --- a/include/dtl/variables.hpp +++ b/include/dtl/variables.hpp.in @@ -63,7 +63,7 @@ using std::vector; /** * version string */ -const string version = "1.21"; +const string version = "@DTL_VERSION@"; /** * type of edit for SES