From: ageay Date: Mon, 21 Oct 2013 09:11:07 +0000 (+0000) Subject: XDR detection for Win7. X-Git-Tag: V7_3_0a1~82 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=374e958787c85ad609de4d562a32963bd38c63a2;p=modules%2Fmed.git XDR detection for Win7. --- diff --git a/src/MEDLoader/MEDLoader.cxx b/src/MEDLoader/MEDLoader.cxx index df3ddc25d..67e2d6490 100644 --- a/src/MEDLoader/MEDLoader.cxx +++ b/src/MEDLoader/MEDLoader.cxx @@ -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. */ diff --git a/src/MEDLoader/MEDLoader.hxx b/src/MEDLoader/MEDLoader.hxx index 1a24e9b5d..7cc1ee6d9 100644 --- a/src/MEDLoader/MEDLoader.hxx +++ b/src/MEDLoader/MEDLoader.hxx @@ -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 GetMeshNames(const char *fileName); static std::vector< std::vector< std::pair > > GetUMeshGlobalInfo(const char *fileName, const char *meshName, int &meshDim, int& spaceDim, int& numberOfNodes); diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index c7686307b..e67fde2d0 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -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); diff --git a/src/MEDLoader/Swig/SauvLoaderTest.py b/src/MEDLoader/Swig/SauvLoaderTest.py index c4f70d342..0da6104cd 100644 --- a/src/MEDLoader/Swig/SauvLoaderTest.py +++ b/src/MEDLoader/Swig/SauvLoaderTest.py @@ -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") )