# (anymore) which was deprecated for C++11 and removed in the C++17 standard.
# Older boost versions can't know about this but provide a possibility to
# circumvent the issue. Hence, we just check ourselves.
- PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
- PUSH_CMAKE_REQUIRED("-Werror")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_VERSION_FLAG}")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "-Werror")
CHECK_CXX_SOURCE_COMPILES(
"
# Test that Boost.Iostreams is usable.
#
RESET_CMAKE_REQUIRED()
- PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
- SET(CMAKE_REQUIRED_LIBRARIES "${BOOST_LIBRARIES}")
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_VERSION_FLAG}")
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${BOOST_LIBRARIES})
LIST(APPEND CMAKE_REQUIRED_INCLUDES ${BOOST_INCLUDE_DIRS})
CHECK_CXX_SOURCE_COMPILES(
FILE(STRINGS "${SACADO_CONFIG_H}" SACADO_CXX11_STRING
REGEX "#define HAVE_SACADO_CXX11")
ENDIF()
-
+
#
# GCC 6.3.0 has a bug that prevents the creation of complex
# numbers templated on Sacado::Rad::ADvar types:
#
- # include/c++/6.3.0/complex: In instantiation of
+ # include/c++/6.3.0/complex: In instantiation of
# ‘struct std::complex<Sacado::Rad::ADvar<double> >’:
# include/c++/6.3.0/complex:206:16: error: ‘std::complex<_Tp>& std::complex<_Tp>::operator=(const std::complex<_Tp>&) [with _Tp = Sacado::Rad::ADvar<double>]’ declared to take const reference, but implicit declaration would take non-const
#
NO_DEFAULT_PATH NO_CMAKE_ENVIRONMENT_PATH NO_CMAKE_PATH
NO_SYSTEM_ENVIRONMENT_PATH NO_CMAKE_SYSTEM_PATH NO_CMAKE_FIND_ROOT_PATH
)
-
+
IF(EXISTS ${SACADO_TRAD_HPP})
LIST(APPEND CMAKE_REQUIRED_INCLUDES ${Trilinos_INCLUDE_DIRS})
- PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
-
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_VERSION_FLAG}")
+
CHECK_CXX_SOURCE_COMPILES(
"
#include <Sacado_trad.hpp>
# values from constant objects.
#
- SET(CMAKE_REQUIRED_LIBRARIES ${ADOLC_LIBRARIES})
- SET(CMAKE_REQUIRED_INCLUDES ${ADOLC_INCLUDE_DIRS})
- SET(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_FLAGS}")
+ LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${ADOLC_LIBRARIES})
+ LIST(APPEND CMAKE_REQUIRED_INCLUDES ${ADOLC_INCLUDE_DIRS})
+ ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${DEAL_II_CXX_FLAGS}")
CHECK_CXX_SOURCE_COMPILES("
#include <adolc/adouble.h>
#include <iostream>
}"
ADOLC_ADOUBLE_OSTREAM_CHECK)
+ RESET_CMAKE_REQUIRED()
+
IF(NOT ADOLC_DOUBLE_CAST_CHECK)
MESSAGE(STATUS
"Could not find a sufficient ADOL-C installation: "