-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
CMake find_package with a minimal CGAL version number does not detect properly 6.X CGAL version #8192
Comments
That is an history of PR #4697 and, in particular commit 252b58d, it seems that at that time we decided that, if the CMake user-code was asking for CGAL compatible with version 5.1, then a major version change like 6.0 would not be compatible. Do you agree it was a reasonable choice? In recent CMake versions, I am open for a discussion, here. @VincentRouvreau, @afabri, @sloriot, others, please comment. |
Will the major changes for CGAL 6.0 invalidate the CMake code above? find_package(CGAL 5.1.0...<6.0.0)
if (NOT TARGET CGAL::CGAL)
find_package(CGAL 6.0.0)
endif() But I can still do: find_package(CGAL) # No expected version
if (NOT TARGET CGAL::CGAL)
# Do some tests to check the version number
endif() |
After a discussion with @sloriot, we decided that we will change that file |
Thanks for the fix proposal ! |
@VincentRouvreau A pull-request fixing that issue is being tested: #8221. |
Issue Details
CMake
find_package(CGAL 5.1.0)
(with a minimal cgal version number) does not seem to behave as expected with master version.Source Code
Here is a CMake file to reproduce the behaviour:
With CGAL 5.1.5, it works fine:
(tested with 5.5.3 also).
But, with 6.0-I-207 (master from some days ago):
Environment
cmake 3.29.0 hcfe8598_0 conda-forge
eigen 3.4.0 h00ab1b0_0 conda-forge
gmp 6.3.0 h59595ed_1 conda-forge
mpfr 4.2.1 h9458935_0 conda-forge
The text was updated successfully, but these errors were encountered: