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

refactor cmake scripts into smaller files #557

Merged
merged 5 commits into from
Oct 7, 2020

Conversation

jlblancoc
Copy link
Member

@jlblancoc jlblancoc commented Oct 6, 2020

I thought this is a good step before addressing #478 , since adding support for more system libraries will add a lot of extra cmake code, so it might be better to keep it hierarchically organized, one script for each external dependency.

It passes all tests in a local build.

### These patches only affect usage of MKL. If you want to enable MKL, you *must*
### use our patched version of Eigen
### See: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=704 (Householder QR MKL selection)
### http://eigen.tuxfamily.org/bz/show_bug.cgi?id=705 (Fix MKL LLT return code)
Copy link
Collaborator

Choose a reason for hiding this comment

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

These two are fixed in 2015, I am curious that are these still relevant for us?

Copy link
Member Author

@jlblancoc jlblancoc Oct 6, 2020

Choose a reason for hiding this comment

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

You're right. I checked it and apparently the current embedded copy of Eigen doesn't have any patch applied.
I will remove the comments.

There were a number of comments that looked doubtful to me. Those 100% immediately-clear wrong or outdated were removed, but I left most of them untouched in the first commit of this PR to first check if all tests passed.

@jlblancoc
Copy link
Member Author

An additional change: the system version of Eigen3 is used by default if it is successfully first found in the system. In other words:

  • Is Eigen missing? -> Quietly select embedded version.
  • Is Eigen available as system package? -> Quietly select it.

In any case, one can override the selection with the same good-old cmake variable GTSAM_USE_SYSTEM_EIGEN.

I hope you agree with this policy.

@dellaert
Copy link
Member

dellaert commented Oct 7, 2020

An additional change: the system version of Eigen3 is used by default if it is successfully first found in the system. In other words:

  • Is Eigen missing? -> Quietly select embedded version.
  • Is Eigen available as system package? -> Quietly select it.

In any case, one can override the selection with the same good-old cmake variable GTSAM_USE_SYSTEM_EIGEN.

I hope you agree with this policy.

I think this is not a bad policy, but it is a change that could break - silently and in a way that is hard to debug - several installs of GTSAM out in the world. Regardless, I think that change should not be part of this PR. If we do it, it should be it’s own PR and widely disseminated/documented.

Copy link
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Love it, but blocking for now as I think Eigen change is not kosher in this PR. After that is reversed, i will gladly approve.

CMakeLists.txt Outdated Show resolved Hide resolved
@jlblancoc
Copy link
Member Author

Love it, but blocking for now as I think Eigen change is not kosher in this PR. After that is reversed, i will gladly approve.

Reverted too.

@jlblancoc
Copy link
Member Author

jlblancoc commented Oct 7, 2020 via email

@dellaert dellaert merged commit 76a30a2 into develop Oct 7, 2020
@dellaert dellaert deleted the feature/refactor-cmake-scripts branch October 7, 2020 17:11
@dellaert
Copy link
Member

dellaert commented Oct 7, 2020

Thanks again !!!!!

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.

3 participants