Skip to content

Commit 18be45b

Browse files
committed
Update versioning
1 parent 4535a36 commit 18be45b

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

CMakeLists.txt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,14 @@ set(XCPP_TAGFILES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/share/xeus-cpp/tagfiles)
3030
set(XEUS_CPP_CONF_DIR "etc/xeus-cpp" CACHE STRING "xeus-cpp configuration directory")
3131
set(XCPP_TAGCONFS_DIR ${CMAKE_CURRENT_SOURCE_DIR}/etc/xeus-cpp/tags.d)
3232

33-
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp.in"
34-
"${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp")
35-
3633
# Versionning
3734
# ===========
3835

39-
file(STRINGS "${XEUS_CPP_INCLUDE_DIR}/xeus-cpp/xeus_cpp_config.hpp" version_defines
40-
REGEX "#define XEUS_CPP_VERSION_(MAJOR|MINOR|PATCH)")
41-
foreach (ver ${version_defines})
42-
if (ver MATCHES "#define XEUS_CPP_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$")
43-
set(XEUS_CPP_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "")
44-
endif ()
45-
endforeach ()
36+
# Set the version
37+
set(XEUS_CPP_VERSION_MAJOR 0)
38+
set(XEUS_CPP_VERSION_MINOR 4)
39+
set(XEUS_CPP_VERSION_PATCH 0)
40+
4641
set(${PROJECT_NAME}_VERSION
4742
${XEUS_CPP_VERSION_MAJOR}.${XEUS_CPP_VERSION_MINOR}.${XEUS_CPP_VERSION_PATCH})
4843
message(STATUS "Building xeus-cpp v${${PROJECT_NAME}_VERSION}")
@@ -178,6 +173,9 @@ message("Configure kernels: ...")
178173
configure_kernel("/share/jupyter/kernels/xcpp17/")
179174
configure_kernel("/share/jupyter/kernels/xcpp20/")
180175

176+
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp.in"
177+
"${CMAKE_CURRENT_SOURCE_DIR}/include/xeus-cpp/xeus_cpp_config.hpp")
178+
181179
# Source files
182180
# ============
183181

include/xeus-cpp/xeus_cpp_config.hpp.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#define XEUS_CPP_CONFIG_HPP
1111

1212
// Project version
13-
#define XEUS_CPP_VERSION_MAJOR 0
14-
#define XEUS_CPP_VERSION_MINOR 4
15-
#define XEUS_CPP_VERSION_PATCH 0
13+
#define XEUS_CPP_VERSION_MAJOR @XEUS_CPP_VERSION_MAJOR@
14+
#define XEUS_CPP_VERSION_MINOR @XEUS_CPP_VERSION_MINOR@
15+
#define XEUS_CPP_VERSION_PATCH @XEUS_CPP_VERSION_PATCH@
1616

1717
#define XCPP_TAGFILES_DIR "@XCPP_TAGFILES_DIR@"
1818
#define XCPP_TAGCONFS_DIR "@XCPP_TAGCONFS_DIR@"

0 commit comments

Comments
 (0)