VERSION.cmake: allow DNF_VERSION end in .test
We added `test_version_suffix = .test` to .tito/tito.props, but DNF does not build with this change since VERSION.cmake asserts that the built RPM version must match the version defined in VERSION.cmake. This commit modifies VERSION.cmake to consider versions x.y.z.test and x.y.z to be equivalent.
This commit is contained in:
parent
45429b40f5
commit
af498b3a54
|
@ -1,8 +1,9 @@
|
|||
set (DEFAULT_DNF_VERSION "4.14.0")
|
||||
|
||||
if(DEFINED DNF_VERSION)
|
||||
if(NOT ${DEFAULT_DNF_VERSION} STREQUAL ${DNF_VERSION})
|
||||
message(FATAL_ERROR "Variable DEFAULT_DNF_VERSION=" ${DEFAULT_DNF_VERSION} " in VERSION.cmake differs from Version=" ${DNF_VERSION} " in spec")
|
||||
string(REGEX REPLACE "\\.test$" "" DNF_VERSION_BASE "${DNF_VERSION}")
|
||||
if(NOT ${DEFAULT_DNF_VERSION} STREQUAL ${DNF_VERSION_BASE})
|
||||
message(FATAL_ERROR "Variable DEFAULT_DNF_VERSION=" ${DEFAULT_DNF_VERSION} " in VERSION.cmake differs from Version=" ${DNF_VERSION_BASE} " in spec")
|
||||
endif()
|
||||
else()
|
||||
set (DNF_VERSION ${DEFAULT_DNF_VERSION})
|
||||
|
|
Loading…
Reference in New Issue