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

Switch to default FindMOAB.cmake #942

Open
gonuke opened this issue Feb 16, 2024 · 7 comments
Open

Switch to default FindMOAB.cmake #942

gonuke opened this issue Feb 16, 2024 · 7 comments

Comments

@gonuke
Copy link
Member

gonuke commented Feb 16, 2024

We currently rely on a custom built FindMOAB.cmake script to inspect the system and set the right variables for a build. However, MOAB now publishes a their own version of this. We should test to see if we can use this version both to reduce our code burden and rely on updates to that as they emerge.

At the same time, we can confirm whether version string is set by this FindMOAB.cmake to support #788

@ahnaf-tahmid-chowdhury
Copy link
Member

Yes, I have noticed that. PyNE is also using custom FindMOAB.

@ahnaf-tahmid-chowdhury
Copy link
Member

While updating PyNE's FindMOAB.cmake, I noticed that the MOABConfig.cmake file does not contain the version number of MOAB. I also observed that there is a file named libMOAB.so.X.X.X, where X.X.X represents the version number, in the $MOAB_ROOT/lib folder. Would you like to use this file to extract the MOAB version?

@gonuke
Copy link
Member Author

gonuke commented Feb 28, 2024

I think we need to make a PR to MOAB to ensure that tis does include the version number. It is defined in the MOAB CMakeFiles.txt. I don't think it's robust to rely on the library name

@ahnaf-tahmid-chowdhury
Copy link
Member

A PR in on the way.

@vijaysm
Copy link
Contributor

vijaysm commented Mar 6, 2024

The typical way to decipher the version is to look at src/moab/MOABConfig.h which gets generated at configure time and installed along with other headers. I can modify FindMOAB.cmake to look at the header to get the version number out. I'll check the submitted PR to make sure it generates the details correctly; if not, I would recommend doing the above.

@gonuke
Copy link
Member Author

gonuke commented Mar 6, 2024

@vijaysm - do you provide a FindMOAB.cmake that sets all the variables that are important? I'd happily replace ours with that, especially if it includes the version number.

@vijaysm
Copy link
Contributor

vijaysm commented Mar 7, 2024

The current one doesn't decipher the version from headers. I think the PR is fine if it makes the workflow simpler. It would be good to expose it in config files rather than just in the header.

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

No branches or pull requests

3 participants