Skip to content
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

Use Cgal and Eigen3 cmake target #1049

Closed
wants to merge 12 commits into from

Conversation

VincentRouvreau
Copy link
Contributor

@VincentRouvreau VincentRouvreau commented Apr 23, 2024

This PR is required by future CGAL 6.0

  • Factorize add_executable and target_link_libraries with CMake targets in a new function add_executable_with_targets
  • Use Cgal and Eigen3 cmake target - requires CGAL >=5.1 and Eigen >= 3.3
  • Remove project from each CMake (just keep the main one) as not mandatory and it does not add any functionality

questions ❓

* [ ] Do we update CGAL_VERSION_NR and EIGEN_VERSION_AT_LEAST check in code ?

@mglisse
Copy link
Member

mglisse commented May 7, 2024

Remove project from each CMake (just keep the main one) as not mandatory and it does not add any functionality

Does it not even help if we have tests with the same name in 2 subprojects, or something like that? Anyway, whatever you prefer.

Do we update CGAL_VERSION_NR and EIGEN_VERSION_AT_LEAST check in code ?

I would say no. The code still works with older versions, it is only the cmake stuff that breaks.

find_package(CGAL 5.1.0) does not work with CGAL master (but 6.0.X). Do we open an issue on CGAL side ?

Yes please. I remember discussing this issue a while ago, but I don't know with whom...
If they don't want to change it before the 6.0 release, we will have to handle that differently in gudhi.

@VincentRouvreau
Copy link
Contributor Author

Does it not even help if we have tests with the same name in 2 subprojects, or something like that? Anyway, whatever you prefer.

From what I read here:

To start a project, we use the project() command to set the project name. This call is required with every project and should be called soon after cmake_minimum_required(). As we will see later, this command can also be used to specify other project level information such as the language or version number.

As all of our code managed by CMake is C++, with the same gudhi version number, cmake minimal version is the same for all the library (easier to maintain),... I prefer to keep one project.

@@ -8,7 +8,7 @@
| | diagonal points) such that any couple of matched points are at | |
| Bottleneck distance is the length of | distance at most b, where the distance between points is the sup | :License: MIT (`GPL v3 </licensing/>`_) |
| the longest edge | norm in :math:`\mathbb{R}^2`. | |
| | | :Requires: `CGAL <installation.html#cgal>`_ :math:`\geq` 4.11.0 |
| | | :Requires: `CGAL <installation.html#cgal>`_ :math:`\geq` 5.1.0 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if having the version number repeated everywhere is that useful (it isn't horrible though). A possibility would be to specify it only when it isn't the "default" one.

Copy link
Member

@mglisse mglisse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the tensorflow stuff in this unrelated PR?
IIUC, dynamic=True is now always enabled so they removed the option? The approach looks ok then.

Comment on lines +2 to +3
# The sklearn parse_version function is taken from 'packaging' and this dependency is not mandatory
from sklearn.utils.fixes import parse_version
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure what the comment means.
Do we now need to install sklearn to be able to use the tensorflow stuff?

"""
Constructor for the TensorflowKerasLayer class
"""
# On tensorflow < 2.15.1 set dynamic argument to True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did they really change that in a patch release, i.e. 2.15.0 wants dynamic but 2.15.1 rejects it? That's surprising 😞

@VincentRouvreau
Copy link
Contributor Author

Sorry about that bad merge... I start again a new PR from 96f7508 and I close this one.
Forget the tensorflow proposal, it will come on a new PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants