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

Disallow in-source build to prevent issues #176

Merged
merged 1 commit into from
May 2, 2023
Merged

Disallow in-source build to prevent issues #176

merged 1 commit into from
May 2, 2023

Conversation

facuMH
Copy link
Contributor

@facuMH facuMH commented Apr 24, 2023

It is always recommended (and a good practice) to compile in a build directory. But considering a celerity user could potentially not be familiarized with good programming/debugging practices, this check should save them some time of headache.

Copy link
Member

@psalz psalz left a comment

Choose a reason for hiding this comment

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

Thanks, good idea. Unfortunately this doesn't stop CMakeCache.txt and CMakeFiles from being created (and there doesn't seem to be a way of doing that).

Apparently there's also two built-in variables one can use to prevent in-source builds (undocumented but available since 2006). Maybe we should just use those instead?

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@PeterTh PeterTh 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
Contributor

@fknorr fknorr left a comment

Choose a reason for hiding this comment

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

When squashed, LGTM. Thanks!

CMakeLists.txt Outdated Show resolved Hide resolved
Only check root dir and ask to delete cmake cache/files
@facuMH facuMH merged commit 0a96d15 into master May 2, 2023
@facuMH facuMH deleted the no_in-source branch May 2, 2023 10:09
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