Only use Clang-specific pragma if compiler is Clang

Otherwise the compiler will probably give us a warning that these
pragmas are unknown. By default that warning is disabled with our
own build system, but we also want to be able to link to our library
without incorporating the entire build system too.
This commit is contained in:
Roland Kaufmann 2013-09-24 11:15:26 +02:00
parent 88a38a8e3f
commit f8f6836c2b

View File

@ -39,9 +39,10 @@ namespace Opm
namespace
{
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
#endif /* __clang__ */
// Find the cells that are below and above a depth.
// TODO: add 'anitialiasing', obtaining a more precise split
// by f. ex. subdividing cells cut by the split depths.
@ -63,7 +64,9 @@ namespace Opm
}
}
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif /* __clang__ */
enum WaterInit { WaterBelow, WaterAbove };