Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 39842b7

Browse files
author
Szymon Romik
authored
Merge pull request #667 from igchor/fix_obj_version
Only parse libpmemobj version if it matches a pattern (major[.]minor.*)
2 parents b9e84cb + 3cf91bd commit 39842b7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright 2018-2019, Intel Corporation
2+
# Copyright 2018-2020, Intel Corporation
33
#
44
# Redistribution and use in source and binary forms, with or without
55
# modification, are permitted provided that the following conditions
@@ -128,7 +128,7 @@ if(BUILD_TESTS OR BUILD_EXAMPLES)
128128
find_package(LIBPMEMOBJ REQUIRED 1.4)
129129
endif()
130130

131-
if (LIBPMEMOBJ_VERSION)
131+
if (LIBPMEMOBJ_VERSION AND LIBPMEMOBJ_VERSION MATCHES "[0-9]+[.][0-9]+.*")
132132
string(REGEX REPLACE "\\+git.*" "" LIBPMEMOBJ_VERSION_SHORT ${LIBPMEMOBJ_VERSION})
133133
string(REGEX REPLACE "-rc.*" "" LIBPMEMOBJ_VERSION_SHORT ${LIBPMEMOBJ_VERSION_SHORT})
134134
string(REPLACE "." ";" VERSION_LIST ${LIBPMEMOBJ_VERSION_SHORT})

0 commit comments

Comments
 (0)