Skip to content

Commit d636f7d

Browse files
committed
move version to its own file so it's easy for CLI to query it
1 parent 5f2d3c8 commit d636f7d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
22

33
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build libraries static" FORCE)
4-
set(GEODE_VERSION 0.4.1)
4+
file(READ VERSION GEODE_VERSION)
55

66
project(geode-sdk VERSION ${GEODE_VERSION} LANGUAGES CXX C)
77

@@ -13,6 +13,9 @@ endif()
1313

1414
add_library(${PROJECT_NAME} INTERFACE)
1515

16+
# Rerun CMake on VERSION file change
17+
set_target_properties(${PROJECT_NAME} PROPERTIES CMAKE_CONFIGURE_DEPENDS VERSION)
18+
1619
target_compile_definitions(${PROJECT_NAME} INTERFACE -DPROJECT_NAME=${CMAKE_PROJECT_NAME})
1720

1821
set(GEODE_CODEGEN_PATH ${CMAKE_CURRENT_BINARY_DIR}/codegenned)

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.4.2

0 commit comments

Comments
 (0)