Skip to content

Commit 2464eb0

Browse files
authored
Merge pull request #387 from vdidenko/fix_version_regex
[C++]: Fixed version regexp bug, now allow multi-digit version components
2 parents d57fc53 + 8a02d78 commit 2464eb0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
1818
cmake_policy(VERSION 3.0.2)
1919

20-
file(STRINGS version.txt SBE_VERSION_TXT LIMIT_COUNT 1 REGEX "^[0-9]+(\\.[0-9])+")
21-
string(REGEX REPLACE "^([0-9]+(\\.[0-9])+).*$" "\\1" SBE_VERSION_NUMERIC "${SBE_VERSION_TXT}")
20+
file(STRINGS version.txt SBE_VERSION_TXT LIMIT_COUNT 1 REGEX "^[0-9]+(\\.[0-9]+)+")
21+
string(REGEX REPLACE "^([0-9]+(\\.[0-9]+)+).*$" "\\1" SBE_VERSION_NUMERIC "${SBE_VERSION_TXT}")
2222

2323
project("sbe" VERSION "${SBE_VERSION_NUMERIC}")
2424

0 commit comments

Comments
 (0)