Skip to content

Commit 821d58c

Browse files
committed
Change version string handling to ignore suffixes in CMakeLists.txt
Previously, it would be passed on to CMake which cannot handle suffixes following a `-`.
1 parent b2925f3 commit 821d58c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ endif()
4040
# filenames)
4141
file(
4242
STRINGS src/config.inc CBMC_VERSION
43-
REGEX "CBMC_VERSION = (.*)")
44-
string(REGEX REPLACE "CBMC_VERSION = (.*)" "\\1" CBMC_VERSION ${CBMC_VERSION})
43+
REGEX "CBMC_VERSION = ([0-9.]+).*")
44+
string(REGEX REPLACE "CBMC_VERSION = ([0-9.]+).*" "\\1" CBMC_VERSION ${CBMC_VERSION})
4545
message(STATUS "Building CBMC version ${CBMC_VERSION}")
4646

4747
project(CBMC VERSION ${CBMC_VERSION})

0 commit comments

Comments
 (0)