From: David Wells Date: Thu, 18 Jun 2020 21:28:48 +0000 (-0400) Subject: Fix detection of muParser 2.3.2. X-Git-Tag: v9.3.0-rc1~1401^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F10550%2Fhead;p=dealii.git Fix detection of muParser 2.3.2. --- diff --git a/cmake/modules/FindMUPARSER.cmake b/cmake/modules/FindMUPARSER.cmake index 7f4066adb0..771d6ff5e8 100644 --- a/cmake/modules/FindMUPARSER.cmake +++ b/cmake/modules/FindMUPARSER.cmake @@ -42,9 +42,22 @@ DEAL_II_FIND_PATH(MUPARSER_INCLUDE_DIR muParserDef.h IF(EXISTS ${MUPARSER_INCLUDE_DIR}/muParserDef.h) FILE(STRINGS "${MUPARSER_INCLUDE_DIR}/muParserDef.h" MUPARSER_VERSION_STRING_LINE + # Try to match the line + # + # #define MUP_VERSION _T("2.2.4") REGEX "#define MUP_VERSION _T" ) - + + IF("${MUPARSER_VERSION_STRING_LINE}" STREQUAL "") + # try again with the newer version format (starting in at least 2.3.2), + # which matches the line + # + # static const string_type ParserVersion = string_type(_T("2.3.2")); + FILE(STRINGS "${MUPARSER_INCLUDE_DIR}/muParserDef.h" MUPARSER_VERSION_STRING_LINE + REGEX "string_type ParserVersion = string_type" + ) + ENDIF() + STRING(REGEX REPLACE ".*\"(.*)\".*" "\\1" _VERSION_STRING "${MUPARSER_VERSION_STRING_LINE}" )