Skip to content

set the cmake build to out-of-source #50

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

Merged
merged 3 commits into from
Dec 30, 2019

Conversation

pdebuyl
Copy link
Contributor

@pdebuyl pdebuyl commented Dec 29, 2019

Change the github workflow for the cmake build.

I open the PR to trigger the workflow for the branch. The manual makefiles are not touched.

@certik
Copy link
Member

certik commented Dec 29, 2019 via email

@zbeekman
Copy link
Member

@certik

I suggest we test both in tree and out of tree.

Out of curiosity, what is the motivation for maintaining in-tree builds?

Out-of-source builds are easier to cleanup after, and don't risk clobbering WIP changes. If we truly want to support both then I suppose we should test in source builds too, but I don't see a strong case for insisting on supporting both. In addition, out-of-source builds are more likely to fail from a misconfigured build system than in-source builds are.

I don't care that much about whether or not we want to support in source builds, but we don't want a combinatorial explosion of our build matrix if we can avoid it.

@zbeekman zbeekman mentioned this pull request Dec 29, 2019
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.

LGTM

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.

Small fix: Delete stale comment please.

@@ -52,10 +52,10 @@ jobs:
run: brew install gcc@${GCC_V} || brew upgrade gcc@${GCC_V} || true

- name: Configure with CMake
run: cmake -Wdev -S . -B . # We should build out of source but loadtxt needs fixing
run: cmake -Wdev -S . -B build # We should build out of source but loadtxt needs fixing
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
run: cmake -Wdev -S . -B build # We should build out of source but loadtxt needs fixing
run: cmake -Wdev -S . -B build

Copy link
Member

Choose a reason for hiding this comment

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

Actually, this comment should be deleted if the issue is fixed and being tested.

@pdebuyl
Copy link
Contributor Author

pdebuyl commented Dec 30, 2019

I removed the comment. I didn't see that one could accept "suggested commits" online and did it via the CLI.

Regarding in-tree builds, I don't use them in my projects, I don't know how useful they are.

I proposed the cmake patch because I tested the build on my computer with the "idiomatic"

mkdir build
cd build
cmake ..
make

Maybe we need test users, with different coding habits.

@zbeekman
Copy link
Member

It seems @certik is one such "test user" as he reported elsewhere that he typically does in-tree CMake builds... Given the goal of supporting Makefiles and CMake, I would advocate for in-source builds being "unsupported". Interested parties can still try to keep them working, but I don't want to explode our CI test matrix anymore than 3 oses and 3 versions of Fortran compilers, unless there is a really good reason.

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.

LGTM

@jacobwilliams
Copy link
Member

I don't think we should encourage in-source builds. :)

@certik
Copy link
Member

certik commented Dec 30, 2019

This PR is ready to go in, so I am going to merge it.

@certik certik merged commit 5a2183e into fortran-lang:master Dec 30, 2019
@certik
Copy link
Member

certik commented Dec 30, 2019

I submitted #55 for in-tree CI tests.

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.

4 participants