mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-19 18:45:43 +00:00
Merge topic 'better_compiler_detection'
f5f9939f Update all of vtkm to understand it can only identify as one compiler. c706c826 Configure.h can only state a machine is a one compiler. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !307
This commit is contained in:
commit
ede404191e
@ -34,7 +34,7 @@
|
||||
#include <vtkm/worklet/WorkletMapField.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -224,6 +224,6 @@ int main(int argc, char** argv)
|
||||
glutMainLoop();
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <vtkm/cont/DataSet.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -281,6 +281,6 @@ int main(int argc, char* argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include <math.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -299,6 +299,6 @@ int main(int argc, char* argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -357,6 +357,6 @@ int main(int argc, char* argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -322,6 +322,6 @@ int main(int argc, char* argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -278,6 +278,6 @@ int main(int argc, char* argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include <vtkm/cont/testing/Testing.h>
|
||||
|
||||
//Suppress warnings about glut being deprecated on OSX
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -227,6 +227,6 @@ int main(int argc, char* argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@ namespace vtkm {
|
||||
// operation, and than casted back down to char's when return.
|
||||
// This causes a false positive warning, even when the values is within
|
||||
// the value types range
|
||||
#if defined(VTKM_GCC) || defined(VTKM_CLANG)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#endif // gcc || clang
|
||||
@ -59,7 +59,7 @@ struct Product
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(VTKM_GCC) || defined(VTKM_CLANG)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // gcc || clang
|
||||
|
||||
|
@ -682,7 +682,7 @@ struct BindRightBinaryOp
|
||||
// operation, and than casted back down to char's when return.
|
||||
// This causes a false positive warning, even when the values is within
|
||||
// the value types range
|
||||
#if defined(VTKM_GCC) || defined(VTKM_CLANG)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wconversion"
|
||||
#endif // gcc || clang
|
||||
@ -731,7 +731,7 @@ struct Negate
|
||||
}
|
||||
};
|
||||
|
||||
#if defined(VTKM_GCC) || defined(VTKM_CLANG)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
#pragma GCC diagnostic pop
|
||||
#endif // gcc || clang
|
||||
|
||||
|
@ -28,26 +28,29 @@
|
||||
#define VTKM_OPENMP
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined(_MSC_VER)
|
||||
//MSVC 2015+ can use a clang frontend, so we want to label it only as MSVC
|
||||
//and not MSVC and clang
|
||||
#define VTKM_MSVC
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && !defined(__INTEL_COMPILER)
|
||||
//On OSX the intel compiler uses clang as the front end
|
||||
#define VTKM_CLANG
|
||||
#endif
|
||||
|
||||
#ifdef __INTEL_COMPILER
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
//Intel 14+ on OSX uses a clang frontend, so again we want to label them as
|
||||
//intel only, and not intel and clang
|
||||
#define VTKM_ICC
|
||||
#endif
|
||||
|
||||
#ifdef __PGI
|
||||
#elif defined(__PGI)
|
||||
// PGI reports as GNUC as it generates the same ABI, so we need to check for
|
||||
// it before gcc.
|
||||
#define VTKM_PGI
|
||||
#endif
|
||||
|
||||
#elif defined(__clang__)
|
||||
//Check for clang before GCC, as clang says it is GNUC since it has ABI
|
||||
//compliance
|
||||
#define VTKM_CLANG
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
// Several compilers pretend to be GCC but have minor differences. Try to
|
||||
// compensate for that.
|
||||
#if defined(__GNUC__) && !defined(VTKM_CLANG) && !defined(VTKM_ICC)
|
||||
// compensate for that, by checking for those compilers first
|
||||
#define VTKM_GCC
|
||||
#endif
|
||||
|
||||
@ -119,7 +122,7 @@
|
||||
// that should be wrapped around any #include for a boost or thrust header file. Mostly
|
||||
// this is used to set pragmas that dissable warnings that VTK-m checks for
|
||||
// but boost and thrust does not.
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
|
||||
#define VTK_M_THIRDPARTY_GCC_WARNING_PRAGMAS \
|
||||
_Pragma("GCC diagnostic ignored \"-Wconversion\"") \
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <vtkm/internal/Configure.h>
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
#endif
|
||||
@ -164,7 +164,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user