From: Matthias Maier Date: Tue, 21 Mar 2017 19:00:04 +0000 (-0500) Subject: CMake: Extract opencascade version in a more robust manner X-Git-Tag: v8.5.0-rc1~20^2~5 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db7df6bbb95c83767f80a874fa59b77869fccf5;p=dealii.git CMake: Extract opencascade version in a more robust manner --- diff --git a/cmake/modules/FindOPENCASCADE.cmake b/cmake/modules/FindOPENCASCADE.cmake index 0d064a8d47..c4ac8ed3df 100644 --- a/cmake/modules/FindOPENCASCADE.cmake +++ b/cmake/modules/FindOPENCASCADE.cmake @@ -43,7 +43,11 @@ DEAL_II_FIND_PATH(OPENCASCADE_INCLUDE_DIR Standard_Version.hxx IF(EXISTS ${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx) FILE(STRINGS "${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx" OPENCASCADE_VERSION - REGEX "#define OCC_VERSION _T" + REGEX "#define OCC_VERSION_COMPLETE " + ) + STRING(REGEX REPLACE + "#define OCC_VERSION_COMPLETE.*\"(.*)\"" "\\1" + OPENCASCADE_VERSION "${OPENCASCADE_VERSION}" ) ENDIF()