IF ("${PYTHON_VERSION_MAJOR}" STREQUAL "3")
MESSAGE(STATUS "Using Python 3")
ENDIF()
+ IF ("${SWIG_VERSION}" VERSION_GREATER_EQUAL "4")
+ SET(MEDCOUPLING_SWIG4_COMPAT TRUE CACHE BOOL "SWIG 4 compatibility (experimental)")
+ ELSE()
+ SET(MEDCOUPLING_SWIG4_COMPAT FALSE)
+ ENDIF()
+ IF(MEDCOUPLING_SWIG4_COMPAT)
+ LIST(APPEND CMAKE_SWIG_FLAGS "-DMEDCOUPLING_SWIG4_COMPAT")
+ ENDIF()
ENDIF(MEDCOUPLING_ENABLE_PYTHON)
IF(MEDCOUPLING_BUILD_DOC)
catch (INTERP_KERNEL::Exception& _e) {
// Reraise with SWIG_Python_Raise
SWIG_Python_Raise(SWIG_NewPointerObj((new INTERP_KERNEL::Exception(static_cast< const INTERP_KERNEL::Exception& >(_e))),SWIGTYPE_p_INTERP_KERNEL__Exception,SWIG_POINTER_OWN), "INTERP_KERNEL::Exception", SWIGTYPE_p_INTERP_KERNEL__Exception);
+#ifdef MEDCOUPLING_SWIG4_COMPAT
+ return nullptr;
+#else
SWIG_fail;
+#endif
}
}