DEAL_II_ADD_DEFINITIONS(obj_tbb "DO_ITT_NOTIFY")
ENDIF()
ENDIF()
-
-#
-# Workaround for clang to compile in C++11 mode:
-#
-IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
- DEAL_II_ADD_DEFINITIONS(obj_tbb "TBB_IMPLEMENT_CPP0X=1")
-ENDIF()
MESSAGE(STATUS "Insufficient C++11 support. Disabling ${DEAL_II_CXX11_FLAG}.")
ENDIF()
-#
-# Currently unused
-#
-# IF(DEAL_II_USE_CXX11)
-# #
-# # Also test for a couple of C++11 things that we don't use in the
-# # library but that users may want to use in their applications and that
-# # we might want to test in the testsuite
-# #
-# # TODO: Actually we have to export the test results somehow. :-]
-# #
+ IF(DEAL_II_USE_CXX11)
+ CHECK_CXX_SOURCE_COMPILES(
+ "
+ #include <type_traits>
+ int main(){ std::is_trivially_copyable<int> bob; }
+ "
+ DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE)
+
+# Currently unused:
#
# CHECK_CXX_SOURCE_COMPILES(
# "
# SET(DEAL_II_CAN_USE_ADDITIONAL_CXX1X_FEATURES)
# ENDIF()
#
-# ENDIF()
+ ENDIF()
POP_TEST_FLAG()
#
-# Set up genereal threading:
+# Set up general threading:
# The macro will be included in CONFIGURE_FEATURE_THREADS_EXTERNAL/BUNDLED.
#
MACRO(SETUP_THREADING)
ENDIF()
+ #
+ # Workaround for an issue with C++11 mode, non gcc-compilers and missing
+ # template<typename T> std::ist_trivially_copyable<T>
+ #
+ IF( DEAL_II_USE_CXX11 AND
+ NOT DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE AND
+ NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
+ LIST(APPEND DEAL_II_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
+ ENDIF()
+
SETUP_THREADING()
ENDMACRO()
)
ENDIF()
+ #
+ # Workaround for an issue with C++11 mode, non gcc-compilers and missing
+ # template<typename T> std::ist_trivially_copyable<T>
+ #
+ IF( DEAL_II_USE_CXX11 AND
+ NOT DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE AND
+ NOT CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
+ LIST(APPEND DEAL_II_DEFINITIONS "TBB_IMPLEMENT_CPP0X=1")
+ ENDIF()
+
#
# tbb uses dlopen/dlclose, so link against libdl.so as well:
#
# define DEAL_II_CAN_USE_CXX1X
#endif
+/* Defined if C++11 is enabled and the standard library supports
+ * template<typename T> std::is_trivially_copyable<T>
+ */
+#cmakedefine DEAL_II_HAVE_CXX11_IS_TRIVIALLY_COPYABLE
+
/* Defined if isnan is available */
#cmakedefine HAVE_ISNAN