Skip to content

Commit 5d43298

Browse files
committed
Make easier the versioning
1 parent e253f51 commit 5d43298

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Unreleased
22

3+
0.4.0
34
- Renamed root documentation files to Markdown and consolidated the active
45
roadmap into `README.md`, removing the standalone TODO file.
56
- Added VSM cost analysis modes:

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cmake_minimum_required(VERSION 3.13)
2-
project(openvcl VERSION 0.3.3 LANGUAGES CXX)
2+
project(openvcl VERSION 0.4.0 LANGUAGES CXX)
33

44
set(CMAKE_CXX_STANDARD 11)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -11,6 +11,9 @@ if(DEFINED ENV{PS2DEV} AND CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
1111
"Installation prefix (defaults to \$PS2DEV)" FORCE)
1212
endif()
1313

14+
# Generate the version header from the project() version field.
15+
configure_file(src/OpenVclVersion.h.in ${CMAKE_CURRENT_BINARY_DIR}/OpenVclVersion.h @ONLY)
16+
1417
# All translation units that form the openvcl binary.
1518
file(GLOB OPENVCL_SOURCES CONFIGURE_DEPENDS "src/*.cpp")
1619

@@ -22,6 +25,9 @@ set_target_properties(openvcl PROPERTIES
2225
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}
2326
)
2427

28+
# Expose the generated header to all source files.
29+
target_include_directories(openvcl PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
30+
2531
target_compile_options(openvcl PRIVATE
2632
-Wall
2733
-Werror
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
namespace vcl
55
{
66

7-
static const char* const OPENVCL_VERSION = "0.3.3";
7+
static const char* const OPENVCL_VERSION = "@PROJECT_VERSION@";
88

99
}
1010

0 commit comments

Comments
 (0)