Salome HOME
XDR detection for Win7.
authorageay <ageay>
Mon, 21 Oct 2013 09:11:07 +0000 (09:11 +0000)
committerageay <ageay>
Mon, 21 Oct 2013 09:11:07 +0000 (09:11 +0000)
src/MEDLoader/MEDLoader.cxx
src/MEDLoader/MEDLoader.hxx
src/MEDLoader/Swig/MEDLoaderCommon.i
src/MEDLoader/Swig/SauvLoaderTest.py

index df3ddc25d14ae1cb444e8ee883d6c550b0c3c091..67e2d6490526412dba1801347c12a2f8f56bc11f 100644 (file)
@@ -282,6 +282,15 @@ void MEDLoaderNS::dispatchElems(int nbOfElemCell, int nbOfElemFace, int& nbOfEle
 
 /// @endcond
 
+bool MEDLoader::HasXDR()
+{
+#ifdef HAS_XDR
+  return true;
+#else
+  return false;
+#endif HAS_XDR
+}
+
 /*!
  * This method sets the epsilon value used for node comparison when trying to buid a profile for a field on node/cell on an already written mesh.
  */
index 1a24e9b5d6f8739f8764cc3a0c5804a44fad43a2..7cc1ee6d9c9ce0e88f3d8b41d2eb8fa6e8ad279f 100644 (file)
@@ -42,6 +42,7 @@ class MEDLOADER_EXPORT MEDLoader
   static void SetEpsilonForNodeComp(double val);
   static void SetCompPolicyForCell(int val);
   static void SetTooLongStrPolicy(int val);
+  static bool HasXDR();
   static void CheckFileForRead(const char *fileName);
   static std::vector<std::string> GetMeshNames(const char *fileName);
   static std::vector< std::vector< std::pair<INTERP_KERNEL::NormalizedCellType,int> > > GetUMeshGlobalInfo(const char *fileName, const char *meshName, int &meshDim, int& spaceDim, int& numberOfNodes);
index c7686307b90b282b327bc2890807ffdb5fa722c1..e67fde2d0b492ffdd04901a1cb136150c869e111 100644 (file)
@@ -218,6 +218,7 @@ using namespace ParaMEDMEM;
 class MEDLoader
 {
 public:
+  static bool HasXDR();
   static void SetEpsilonForNodeComp(double val) throw(INTERP_KERNEL::Exception);
   static void SetCompPolicyForCell(int val) throw(INTERP_KERNEL::Exception);
   static void SetTooLongStrPolicy(int val) throw(INTERP_KERNEL::Exception);
index c4f70d34287a9f76368f86633b984e8a51439775..0da6104cdc1b71ccc92654f375fd5aa196709db4 100644 (file)
@@ -238,6 +238,7 @@ class SauvLoaderTest(unittest.TestCase):
         os.remove(sauvFile)
         pass
 
+    @unittest.skipUnless(MEDLoader.HasXDR(),"requires XDR")
     def testMissingGroups(self):
         """test for issue 0021749: [CEA 601] Some missing groups in mesh after reading a SAUV file with SauvReader."""
         self.assertTrue( os.getenv("MED_ROOT_DIR") )