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

improve cmake build #51

Merged
merged 4 commits into from
Dec 31, 2019
Merged

improve cmake build #51

merged 4 commits into from
Dec 31, 2019

Conversation

scivision
Copy link
Member

  • use CMAKE_Fortran_MODULE_DIRECTORY to avoid introspecting directory structure
  • don't build in-source, use test WORKING_DIRECTORY instead
  • use modern add_test() syntax to avoid introspecting project directory structure
  • use open(..., action=) to help indicate / safeguard intended file use
  • don't have to accommodate CMake <= 2.4 circa 2006

closes #47

@certik
Copy link
Member

certik commented Dec 30, 2019 via email

@scivision
Copy link
Member Author

scivision commented Dec 30, 2019

Thanks, I changed that test to accept an input directory argument, that will be in a build directory

@scivision scivision mentioned this pull request Dec 30, 2019
Copy link
Member

@certik certik left a comment

Choose a reason for hiding this comment

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

I left two suggestions for indenting, the rest are just comments that are not a blocker. Otherwise +1 to merge!

@certik
Copy link
Member

certik commented Dec 30, 2019

@scivision please allow people with push access to modify your source branch (it's a check box somewhere). Then I can commit my suggestions above and merge this. Tons of other PRs depend on this.

https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/allowing-changes-to-a-pull-request-branch-created-from-a-fork

* use CMAKE_Fortran_MODULE_DIRECTORY to avoid introspecting directory structure
* don't build in-source, use test WORKING_DIRECTORY instead
* use modern add_test() syntax to avoid introspecting project directory structure
* use open(..., action=) to help indicate / safeguard intended file use
* don't have to accomodate CMake <= 2.4 circa 2006
Copy link
Member

@zbeekman zbeekman left a comment

Choose a reason for hiding this comment

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

Other than @certik's indentation issues, this looks like a big improvement to me. I don't know who added calls to include_directories() in and who approved the PR, but that is one of the ~5 CMake commands that should be blacklisted.

@certik
Copy link
Member

certik commented Dec 31, 2019 via email

@zbeekman
Copy link
Member

Looks like this is ready to 🚢

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.

CMake build in place or copy test files
4 participants