ruby: exclude incompatible swig ruby combination by cmake
@@ -49,6 +49,8 @@ if (DEPENDENCY_PHASE)
set_source_files_properties ("ruby.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
elseif (NOT RUBY_FOUND)
remove_plugin (ruby "ruby not found")
+ elseif (SWIG_VERSION VERSION_LESS "4.0.2" AND (RUBY_VERSION VERSION_GREATER "2.7.0" OR RUBY_VERSION VERSION_EQUAL "2.7.0"))
+ remove_plugin (ruby "SWIG <= 4.0.1 incompatible with Ruby >= 2.7")
elseif (NOT ${SUPPORTED_COMPILER})
remove_plugin (ruby "gcc version too old (gcc -dumpversion < 5.0)")
elseif (NOT SWIG_FOUND)
