-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Enable compilation with Eigen 5.0.0 #6354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Seems like there is currently not really a way to specify a version range like |
If I may propose an alternative, have you considered using find_package(Eigen3 NO_MODULE) # find_package(... QUIET ...) may be used
if (NOT Eigen3_FOUND OR Eigen3_VERSION VERSION_LESS 3.3)
# handle the condition, for example:
message(FATAL_ERROR "Eigen3 version>=3.3 is required") # exit with error
# the message, probably, can be identical to what is generated with REQUIRED option
endif() |
@sumir0 Thanks for the suggestion. You propose this as a way to enforce the version requirement, right? And the following should work as well? find_package(Eigen3 REQUIRED NO_MODULE)
if (Eigen3_VERSION VERSION_LESS 3.3)
message(FATAL_ERROR "Eigen3 version>=3.3 is required, but found ${Eigen3_VERSION}")
endif() |
Yes, as a way to not allow users to build this library using some versions of a dependency.
Yes, it should work. But there is a little downside: in the case Eigen3 is not found, the user will get a standard CMake fatal error without version requirement. In some hypothetical scenario the user might install P.S. Actually I do not really know if all |
Add version check for Eigen3 to ensure compatibility.
I understand your point, but that scenario does not seem very likely, and I would rather just use the |
Fixes #6351