diff --git a/src/poly/solver/meson.build b/src/poly/solver/meson.build index de06e2c..47210f4 100644 --- a/src/poly/solver/meson.build +++ b/src/poly/solver/meson.build @@ -10,7 +10,7 @@ libPolySolver = static_library('polySolver', polySolver_sources, include_directories : include_directories('./public'), cpp_args: ['-fvisibility=default'], - dependencies: [mfem_dep, meshio_dep, polycoeff_dep, polyutils_dep], + dependencies: [mfem_dep, meshio_dep, polycoeff_dep, polyutils_dep, warning_control_dep], install: true ) @@ -18,5 +18,5 @@ polysolver_dep = declare_dependency( include_directories : include_directories('./public'), link_with : libPolySolver, sources : polySolver_sources, - dependencies : [mfem_dep, meshio_dep, polycoeff_dep, polyutils_dep] + dependencies : [mfem_dep, meshio_dep, polycoeff_dep, polyutils_dep, warning_control_dep] ) \ No newline at end of file diff --git a/src/poly/utils/meson.build b/src/poly/utils/meson.build index 80f4c95..041e5b0 100644 --- a/src/poly/utils/meson.build +++ b/src/poly/utils/meson.build @@ -12,7 +12,7 @@ libpolyutils = static_library('polyutils', polyutils_sources, include_directories : include_directories('./public'), cpp_args: ['-fvisibility=default'], - dependencies: [mfem_dep], + dependencies: [mfem_dep, warning_control_dep], install: true ) @@ -20,5 +20,5 @@ polyutils_dep = declare_dependency( include_directories : include_directories('./public'), link_with : libpolyutils, sources : polyutils_sources, - dependencies : [mfem_dep] + dependencies : [mfem_dep, warning_control_dep] ) diff --git a/src/resources/macros/meson.build b/src/resources/macros/meson.build new file mode 100644 index 0000000..c0e19aa --- /dev/null +++ b/src/resources/macros/meson.build @@ -0,0 +1 @@ +warning_control_dep = declare_dependency(include_directories: include_directories('.')) \ No newline at end of file diff --git a/src/resources/macros/warning_control.h b/src/resources/macros/warning_control.h new file mode 100644 index 0000000..23bf5a8 --- /dev/null +++ b/src/resources/macros/warning_control.h @@ -0,0 +1,16 @@ +#ifndef WARNING_CONTROL_H +#define WARNING_CONTROL_H + +#if defined(__GNUC__) || defined(__clang__) + #define DEPRECATION_WARNING_OFF _Pragma("GCC diagnostic push") \ + _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") + #define DEPRECATION_WARNING_ON _Pragma("GCC diagnostic pop") +#elif defined(_MSC_VER) + #define DEPRECATION_WARNING_OFF __pragma(warning(push)) __pragma(warning(disable: 4996)) + #define DEPRECATION_WARNING_ON __pragma(warning(pop)) +#else + #define DEPRECATION_WARNING_OFF + #define DEPRECATION_WARNING_ON +#endif + +#endif // WARNING_CONTROL_H diff --git a/src/resources/meson.build b/src/resources/meson.build index 4a8d44e..5ae81d9 100644 --- a/src/resources/meson.build +++ b/src/resources/meson.build @@ -1 +1,2 @@ -subdir('const') \ No newline at end of file +subdir('const') +subdir('macros') \ No newline at end of file