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>
|
#include <vtkm/worklet/WorkletMapField.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -224,6 +224,6 @@ int main(int argc, char** argv)
|
|||||||
glutMainLoop();
|
glutMainLoop();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#include <vtkm/cont/DataSet.h>
|
#include <vtkm/cont/DataSet.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -281,6 +281,6 @@ int main(int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -299,6 +299,6 @@ int main(int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <vtkm/cont/testing/Testing.h>
|
#include <vtkm/cont/testing/Testing.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -357,6 +357,6 @@ int main(int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <vtkm/cont/testing/Testing.h>
|
#include <vtkm/cont/testing/Testing.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -322,6 +322,6 @@ int main(int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <vtkm/cont/testing/Testing.h>
|
#include <vtkm/cont/testing/Testing.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -278,6 +278,6 @@ int main(int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include <vtkm/cont/testing/Testing.h>
|
#include <vtkm/cont/testing/Testing.h>
|
||||||
|
|
||||||
//Suppress warnings about glut being deprecated on OSX
|
//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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#endif
|
||||||
@ -227,6 +227,6 @@ int main(int argc, char* argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(VTKM_GCC) || defined(VTKM_CLANG)) && !defined(VTKM_PGI)
|
#if (defined(VTKM_GCC) || defined(VTKM_CLANG))
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@ namespace vtkm {
|
|||||||
// operation, and than casted back down to char's when return.
|
// operation, and than casted back down to char's when return.
|
||||||
// This causes a false positive warning, even when the values is within
|
// This causes a false positive warning, even when the values is within
|
||||||
// the value types range
|
// 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 push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
#endif // gcc || clang
|
#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
|
#pragma GCC diagnostic pop
|
||||||
#endif // gcc || clang
|
#endif // gcc || clang
|
||||||
|
|
||||||
|
@ -682,7 +682,7 @@ struct BindRightBinaryOp
|
|||||||
// operation, and than casted back down to char's when return.
|
// operation, and than casted back down to char's when return.
|
||||||
// This causes a false positive warning, even when the values is within
|
// This causes a false positive warning, even when the values is within
|
||||||
// the value types range
|
// 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 push
|
||||||
#pragma GCC diagnostic ignored "-Wconversion"
|
#pragma GCC diagnostic ignored "-Wconversion"
|
||||||
#endif // gcc || clang
|
#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
|
#pragma GCC diagnostic pop
|
||||||
#endif // gcc || clang
|
#endif // gcc || clang
|
||||||
|
|
||||||
|
@ -28,26 +28,29 @@
|
|||||||
#define VTKM_OPENMP
|
#define VTKM_OPENMP
|
||||||
#endif
|
#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
|
#define VTKM_MSVC
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__clang__) && !defined(__INTEL_COMPILER)
|
#elif defined(__INTEL_COMPILER)
|
||||||
//On OSX the intel compiler uses clang as the front end
|
//Intel 14+ on OSX uses a clang frontend, so again we want to label them as
|
||||||
#define VTKM_CLANG
|
//intel only, and not intel and clang
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __INTEL_COMPILER
|
|
||||||
#define VTKM_ICC
|
#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
|
#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
|
// Several compilers pretend to be GCC but have minor differences. Try to
|
||||||
// compensate for that.
|
// compensate for that, by checking for those compilers first
|
||||||
#if defined(__GNUC__) && !defined(VTKM_CLANG) && !defined(VTKM_ICC)
|
|
||||||
#define VTKM_GCC
|
#define VTKM_GCC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -119,7 +122,7 @@
|
|||||||
// that should be wrapped around any #include for a boost or thrust header file. Mostly
|
// 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
|
// this is used to set pragmas that dissable warnings that VTK-m checks for
|
||||||
// but boost and thrust does not.
|
// 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 \
|
#define VTK_M_THIRDPARTY_GCC_WARNING_PRAGMAS \
|
||||||
_Pragma("GCC diagnostic ignored \"-Wconversion\"") \
|
_Pragma("GCC diagnostic ignored \"-Wconversion\"") \
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <vtkm/internal/Configure.h>
|
#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 push
|
||||||
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
#endif
|
#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
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user