]> https://gitweb.dealii.org/ - dealii.git/commitdiff
cmake check for using and DEAL_II_DEPRECATED 6823/head
authorTimo Heister <timo.heister@gmail.com>
Fri, 22 Jun 2018 00:59:19 +0000 (20:59 -0400)
committerTimo Heister <timo.heister@gmail.com>
Fri, 22 Jun 2018 00:59:19 +0000 (20:59 -0400)
it turns out the intel compiler doesn't like deprecated using:
```
In file included from /ssd/deal-git/source/lac/affine_constraints.cc(16):
/ssd/deal-git/include/deal.II/lac/affine_constraints.h(65): warning #2651: attribute does not apply to any entity
  using ConstraintMatrix DEAL_II_DEPRECATED = AffineConstraints<double>;
```

This updates the cmake check to stop this from happening.

cmake/checks/check_02_compiler_features.cmake

index 56d7e51690156f940df2546de2fa978221221a19..02ca404f4ffc8bd7f4a976e5a5eb1a96754a8104 100644 (file)
@@ -312,6 +312,10 @@ CHECK_CXX_SOURCE_COMPILES(
             [[deprecated]] void test();
           };
 
+          template <int dim>
+          struct foo {};
+          using bar [[deprecated]] = foo<2>;
+
           int main () {}
   "
   DEAL_II_COMPILER_HAS_CXX14_ATTRIBUTE_DEPRECATED
@@ -329,6 +333,10 @@ CHECK_CXX_SOURCE_COMPILES(
             __attribute__((deprecated)) void test();
           };
 
+          template <int dim>
+          struct foo {};
+          using bar __attribute__((deprecated)) = foo<2>;
+
           int main () {}
   "
   DEAL_II_COMPILER_HAS_ATTRIBUTE_DEPRECATED

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.