# Check whether ADOL-C is configured with extra trig functions
#
FILE(STRINGS "${ADOLC_SETTINGS_H}" ADOLC_ATRIG_ERF_STRING
- REGEX "#define ATRIG_ERF"
+ REGEX "^[ \t]*#[ \t]*define[ \t]+ATRIG_ERF"
)
IF(NOT "${ADOLC_ATRIG_ERF_STRING}" STREQUAL "")
SET(ADOLC_WITH_ATRIG_ERF TRUE)
# Check whether ADOL-C is configured with advanced branching
#
FILE(STRINGS "${ADOLC_SETTINGS_H}" ADOLC_ADVANCED_BRANCHING_STRING
- REGEX "#define ADOLC_ADVANCED_BRANCHING"
+ REGEX "^[ \t]*#[ \t]*define[ \t]+ADOLC_ADVANCED_BRANCHING"
)
IF(NOT "${ADOLC_ADVANCED_BRANCHING_STRING}" STREQUAL "")
SET(ADOLC_WITH_ADVANCED_BRANCHING TRUE)
# Check whether ADOL-C is configured with tapeless number reference counting
#
FILE(STRINGS "${ADOLC_SETTINGS_H}" ADOLC_WITH_TAPELESS_REFCOUNTING_STRING
- REGEX "#define USE_ADTL_REFCOUNTING 1"
+ REGEX "^[ \t]*#[ \t]*define[ \t]+USE_ADTL_REFCOUNTING 1"
)
IF(NOT "${ADOLC_WITH_TAPELESS_REFCOUNTING_STRING}" STREQUAL "")
SET(ADOLC_WITH_TAPELESS_REFCOUNTING TRUE)
# Check whether ADOL-C is configured to use the Boost pool allocator
#
FILE(STRINGS "${ADOLC_SETTINGS_H}" ADOLC_BOOST_POOL_STRING
- REGEX "#define USE_BOOST_POOL 1"
+ REGEX "^[ \t]*#[ \t]*define[ \t]+USE_BOOST_POOL 1"
)
IF(NOT "${ADOLC_BOOST_POOL_STRING}" STREQUAL "")
SET(ADOLC_WITH_BOOST_ALLOCATOR TRUE)
IF(EXISTS "${GSL_INCLUDE_DIR}/gsl/gsl_version.h" )
FILE(STRINGS "${GSL_INCLUDE_DIR}/gsl/gsl_version.h" GSL_VERSION_STRING_LINE
- REGEX "#define GSL_VERSION"
+ REGEX "^[ \t]*#[ \t]*define[ \t]+GSL_VERSION"
)
STRING(REGEX REPLACE ".*([0-9].[0-9]+).*" "\\1" GSL_VERSION
"${GSL_VERSION_STRING_LINE}"
# Try to match the line
#
# #define MUP_VERSION _T("2.2.4")
- REGEX "#define MUP_VERSION _T"
+ REGEX "^[ \t]*#[ \t]*define[ \t]+MUP_VERSION _T"
)
IF("${MUPARSER_VERSION_STRING_LINE}" STREQUAL "")
IF(EXISTS ${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx)
FILE(STRINGS "${OPENCASCADE_INCLUDE_DIR}/Standard_Version.hxx" OPENCASCADE_VERSION
- REGEX "#define OCC_VERSION_COMPLETE "
+ REGEX "^[ \t]*#[ \t]*define[ \t]+OCC_VERSION_COMPLETE "
)
STRING(REGEX REPLACE
"#define OCC_VERSION_COMPLETE.*\"(.*)\"" "\\1"
# Extract version numbers:
#
FILE(STRINGS "${P4EST_INCLUDE_DIR}/p4est_config.h" P4EST_VERSION
- REGEX "#define P4EST_VERSION \"")
+ REGEX "^[ \t]*#[ \t]*define[ \t]+P4EST_VERSION \"")
STRING(REGEX REPLACE "^.*P4EST_VERSION.*\"([0-9]+.*)\".*" "\\1"
P4EST_VERSION "${P4EST_VERSION}"
)
# Determine whether Trilinos was configured with MPI and 64bit indices:
#
FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_MPI_STRING
- REGEX "#define HAVE_MPI")
+ REGEX "^[ \t]*#[ \t]*define[ \t]+HAVE_MPI")
IF("${EPETRA_MPI_STRING}" STREQUAL "")
SET(TRILINOS_WITH_MPI FALSE)
ELSE()
SET(TRILINOS_WITH_MPI TRUE)
ENDIF()
FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_32BIT_STRING
- REGEX "#define EPETRA_NO_32BIT_GLOBAL_INDICES")
+ REGEX "^[ \t]*#[ \t]*define[ \t]+EPETRA_NO_32BIT_GLOBAL_INDICES")
IF("${EPETRA_64BIT_STRING}" STREQUAL "")
SET(TRILINOS_WITH_NO_32BITS_INDICES TRUE)
ELSE()
SET(TRILINOS_WITH_NO_32BITS_INDICES FALSE)
ENDIF()
FILE(STRINGS "${EPETRA_CONFIG_H}" EPETRA_64BIT_STRING
- REGEX "#define EPETRA_NO_64BIT_GLOBAL_INDICES")
+ REGEX "^[ \t]*#[ \t]*define[ \t]+EPETRA_NO_64BIT_GLOBAL_INDICES")
IF("${EPETRA_64BIT_STRING}" STREQUAL "")
SET(TRILINOS_WITH_NO_64BITS_INDICES TRUE)
ELSE()