From 960372aec4db9e7409bfe1f9595990963ced3779 Mon Sep 17 00:00:00 2001 From: Dominik Thoennes <dominik.thoennes@fau.de> Date: Fri, 3 Nov 2023 12:09:23 +0100 Subject: [PATCH] disable deprecation warning; disable conversion warning with `-Werror` in Variant.h --- CMakeLists.txt | 2 ++ src/core/Variant.h | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ff2ea2a8..fee94339c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -395,6 +395,8 @@ if( WALBERLA_CXX_COMPILER_IS_INTEL ) # system headers are also supported by intel, but cmake does not recognize that set( CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem " ) add_flag ( CMAKE_CXX_FLAGS "-wd2928,2504,2259,1682,597" ) + # disable icc/icpc deprecation warning + add_flag ( CMAKE_CXX_FLAGS "-diag-disable=10441" ) elseif( WALBERLA_CXX_COMPILER_IS_GNU ) add_flag ( CMAKE_CXX_FLAGS "-Wfloat-equal -Wextra" ) elseif( WALBERLA_CXX_COMPILER_IS_NEC ) diff --git a/src/core/Variant.h b/src/core/Variant.h index 2be3f0a6c..4295a641f 100644 --- a/src/core/Variant.h +++ b/src/core/Variant.h @@ -21,9 +21,17 @@ #pragma once +// suppress conversion warning that is emitted by icpc compiler with `-Werror` +#if ( defined WALBERLA_CXX_COMPILER_IS_INTEL ) +#pragma warning(push) +#pragma warning disable 68 +#endif #include <variant> +#if ( defined WALBERLA_CXX_COMPILER_IS_INTEL ) +#pragma warning(pop) +#endif namespace walberla -- GitLab