SET(SWIG_MODULE_MEDRenumber_EXTRA_FLAGS -DWITHOUT_AUTOFIELD)
ENDIF(NUMPY_FOUND)
+IF(Boost_FOUND)
+ SET(SWIG_MODULE_MEDRenumber_EXTRA_FLAGS -DHAS_BOOST ${SWIG_MODULE_MEDRenumber_EXTRA_FLAGS})
+ENDIF(Boost_FOUND)
+
+IF(METIS_FOUND)
+ SET(SWIG_MODULE_MEDRenumber_EXTRA_FLAGS -DHAS_METIS ${SWIG_MODULE_MEDRenumber_EXTRA_FLAGS})
+ENDIF(METIS_FOUND)
+
SET (MEDRenumber_SWIG_DPYS_FILES
MEDRenumberCommon.i)
Renumbering *RenumberingFactory(const std::string& s) throw(INTERP_KERNEL::Exception);
}
+%inline
+{
+ std::vector<std::string> RenumberAvailableMethods()throw(INTERP_KERNEL::Exception)
+ {
+ std::vector<std::string> ret;
+#ifdef HAS_BOOST
+ ret.push_back(std::string("BOOST"));
+#endif
+#ifdef HAS_METIS
+ ret.push_back(std::string("METIS"));
+#endif
+ return ret;
+ }
+}
+
%pythoncode %{
import os
__filename=os.environ.get('PYTHONSTARTUP')
import unittest
class MEDRenumberTest(unittest.TestCase):
+
+ @unittest.skipUnless("BOOST" in RenumberAvailableMethods(),"requires BOOST prerequisite !")
def test1(self):
from MEDCoupling import MEDCouplingCMesh
ren=RenumberingFactory("BOOST")