VerifyResult.cmake 657 B

12345678910111213141516
  1. execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist}
  2. OUTPUT_VARIABLE DIST_TAG
  3. ERROR_QUIET
  4. OUTPUT_STRIP_TRAILING_WHITESPACE)
  5. set(whitespaces_ "[\t\n\r ]*")
  6. # since we have no control over dist tag value we should try to escape
  7. # the content for use as a regular expression
  8. string(REPLACE "+" "\\+" DIST_TAG "${DIST_TAG}")
  9. string(REPLACE "." "\\." DIST_TAG "${DIST_TAG}")
  10. getPackageInfo("${FOUND_FILE_1}" "FILE_INFO_")
  11. if(NOT FILE_INFO_ MATCHES ".*Release${whitespaces_}:${whitespaces_}1${DIST_TAG}")
  12. message(FATAL_ERROR "Unexpected Release in '${FOUND_FILE_1}'; file info: '${FILE_INFO_}'")
  13. endif()