* http://goodliffe.blogspot.com/2009/07/c-how-to-say-warning-to-visual-studio-c.html
*/
-#define DEAL_II_STRINGIZE_HELPER(x) #x
-#define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
-#define DEAL_II_WARNING(desc) message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : Warning: " #desc)
+#ifdef _MSC_VER
+ #define DEAL_II_STRINGIZE_HELPER(x) #x
+ #define DEAL_II_STRINGIZE(x) DEAL_II_STRINGIZE_HELPER(x)
+ #define DEAL_II_DO_PRAGMA(x) __pragma(x)
+ #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(__FILE__ "(" DEAL_II_STRINGIZE(__LINE__) ") : warning: " #desc))
+#else
+ #define DEAL_II_DO_PRAGMA(x) _Pragma(#x)
+ #define DEAL_II_WARNING(desc) DEAL_II_DO_PRAGMA(message(#desc))
+#endif
/***********************************************************************
* Final inclusions:
#include <deal.II/base/config.h>
-#pragma DEAL_II_WARNING( \
- "This file is deprecated. Use <deal.II/differentiation/ad/sacado_product_types.h> instead.")
+DEAL_II_WARNING(`"This file is deprecated. Use <deal.II/differentiation/ad/sacado_product_types.h> instead.")
#include <deal.II/differentiation/ad/sacado_product_types.h>
#include <deal.II/dofs/deprecated_function_map.h>
-#pragma DEAL_II_WARNING("This file is deprecated.")
+DEAL_II_WARNING("This file is deprecated.")
#endif
#include <deal.II/base/config.h>
-#pragma DEAL_II_WARNING( \
- "This file is deprecated. Use the Manifold classes instead.")
+DEAL_II_WARNING("This file is deprecated. Use the Manifold classes instead.")
#endif
#include <deal.II/base/config.h>
-#pragma DEAL_II_WARNING( \
- "This file is deprecated.Use the Manifold classes instead.")
+DEAL_II_WARNING("This file is deprecated.Use the Manifold classes instead.")
#endif
#include <deal.II/base/config.h>
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
"This file is deprecated. Use <deal.II/lac/affine_constraints.h> instead.")
#include <deal.II/lac/affine_constraints.h>
#include <deal.II/lac/la_parallel_block_vector.h>
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
"This file is deprecated. Use <deal.II/lac/la_block_vector.h> and LinearAlgebra::distributed::BlockVector instead.")
#include <cstring>
#include <deal.II/lac/la_parallel_vector.h>
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
"This file is deprecated. Use <deal.II/lac/la_parallel_vector.h> and LinearAlgebra::distributed::Vector instead.")
#include <cstring>
#include <deal.II/lac/petsc_block_sparse_matrix.h>
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
"This file is deprecated. Use deal.II/lac/petsc_block_sparse_matrix.h instead!")
#endif // dealii_petsc_parallel_block_sparse_matrix_h
#include <deal.II/lac/petsc_block_vector.h>
-#pragma DEAL_II_WARNING( \
+DEAL_II_WARNING(
"This file is deprecated. Use deal.II/lac/petsc_block_vector.h instead!")
#endif
# include <deal.II/lac/petsc_sparse_matrix.h>
-# pragma DEAL_II_WARNING( \
- "This file is deprecated. Use deal.II/lac/petsc_sparse_matrix.h instead.")
+DEAL_II_WARNING(
+ "This file is deprecated. Use deal.II/lac/petsc_sparse_matrix.h instead.")
#endif
/*---------------------- petsc_parallel_sparse_matrix.h ---------------------*/
# include <deal.II/lac/petsc_vector.h>
-# pragma DEAL_II_WARNING( \
- "This file is deprecated. Use deal.II/lac/petsc_vector.h instead!")
+DEAL_II_WARNING(
+ "This file is deprecated. Use deal.II/lac/petsc_vector.h instead!")
#endif
/*------------------------- petsc_parallel_vector.h -------------------------*/
getrusage(RUSAGE_SELF, &usage);
system_cpu_duration = usage.ru_utime.tv_sec + 1.e-6 * usage.ru_utime.tv_usec;
#else
-# pragma DEAL_II_WARNING("Unsupported platform. Porting not finished.")
+ DEAL_II_WARNING("Unsupported platform. Porting not finished.")
#endif
return time_point(
internal::TimerImplementation::from_seconds<duration>(system_cpu_duration));