# DEAL_II_LINKER_FLAGS
# DEAL_II_LINKER_FLAGS_DEBUG
# DEAL_II_LINKER_FLAGS_RELEASE
+# DEAL_II_DEFINITIONS
+# DEAL_II_DEFINITIONS_DEBUG
+# DEAL_II_DEFINITIONS_RELEASE
+# DEAL_II_USER_DEFINITIONS
+# DEAL_II_USER_DEFINITIONS_DEBUG
+# DEAL_II_USER_DEFINITIONS_RELEASE
#
# All modifications shall be guarded with the ENABLE_IF_SUPPORTED
# or ENABLE_IF_LINKS macro, e.g.
# enable exception handling:
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/EHsc")
-#enable warnings:
-ADD_FLAGS(DEAL_II_CXX_FLAGS "/W3")
# Globally disable some legacy min and max macros that cause problems:
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/NOMINMAX")
+LIST(APPEND DEAL_II_DEFINITIONS "NOMINMAX")
+LIST(APPEND DEAL_II_USER_DEFINITIONS "NOMINMAX")
+
+ADD_FLAGS(DEAL_II_CXX_FLAGS "/W3")
-# Disable warning about unknown pragmas
+#
+# Selectively disable a bunch of warnings:
+#
+# 4068 - unknown pragmas
+# 4244 - implied downcasting from double to float
+# 4267 - implied downcasting from size_t to unsigned int
+# 4996 - unsafe functions, such as strcat and sprintf
+# 4355 - 'this' : used in base member initializer list
+# 4661 - no suitable definition provided for explicit template instantiation request
+# 4800 - forcing value to bool 'true' or 'false' (performance warning)
+# 4146 - unary minus operator applied to unsigned type, result still unsigned
+# 4667 - no function template defined that matches forced instantiation
+# 4520 - multiple default constructors specified
+# 4700 - uninitialized local variable
+# 4789 - destination of memory copy is too small
+# 4808 - case 'value' is not a valid value for switch condition of type 'bool
ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4068")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4244")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4267")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4996")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4355")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4661")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4800")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4146")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4667")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4520")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4700")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4789")
+ENABLE_IF_SUPPORTED(DEAL_II_CXX_FLAGS "/wd4808")
+
#############################
# #
#cmakedefine DEAL_II_MSVC
-/*
- * Disable a bunch of warnings for Microsoft Visual C++.
- */
-#ifdef _MSC_VER
-# pragma warning( disable : 4244 ) /* implied downcasting from double to float */
-# pragma warning( disable : 4267 ) /* implied downcasting from size_t to unsigned int */
-# pragma warning( disable : 4996 ) /* unsafe functions, such as strcat and sprintf */
-# pragma warning( disable : 4355 ) /* 'this' : used in base member initializer list */
-# pragma warning( disable : 4661 ) /* no suitable definition provided for explicit template instantiation request */
-# pragma warning( disable : 4800 ) /* forcing value to bool 'true' or 'false' (performance warning) */
-# pragma warning( disable : 4146 ) /* unary minus operator applied to unsigned type, result still unsigned */
-# pragma warning( disable : 4667 ) /* no function template defined that matches forced instantiation */
-# pragma warning( disable : 4520 ) /* multiple default constructors specified */
-# pragma warning( disable : 4700 ) /* uninitialized local variable */
-# pragma warning( disable : 4789 ) /* destination of memory copy is too small */
-# pragma warning( disable : 4808 ) /* case 'value' is not a valid value for switch condition of type 'bool */
-/*
- * Also make sure we don't let MS Windows headers define min/max as
- * macros, see http://support.microsoft.com/kb/143208
- */
-# define NOMINMAX
-#endif /*_MSC_VER*/
-
/***********************************************************************
* Thread support