-
Notifications
You must be signed in to change notification settings - Fork 2.7k
ENH: Prevent cmake in source builds #1091
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
ENH: Prevent cmake in source builds #1091
Conversation
Building directly inside the root of the source tree can cause problems where the build intermediate files overwrite or conflict with the intended source code files. This modification identifies this problem and issues failure messages and suggestions to over come the problem with more robust build suggestion.
See #1087 for motivation for this improvement. |
It looks like this change requires built bot reconfiguration. If you can change the AppVeyor config to not build in the source directory, I'm happy to approve this patch. |
@hjmjohnson I think this issue can move forward now. Would you like to take a little time to look at this PR to move it forward? |
@hjmjohnson, we've merged the clang-tidy fixes. Maybe that will help you fix VisualStudio? Otherwise, let's close this. |
@cdunn2001, I think? I've fixed the appveyor issue, it's a valid one. I know our CMake support is deprecated but I'm still interested in landing this patch. |
Travis is being slow, but it's all green so going to submit. |
Sorry for asking, but we use your library as a sub project and build this via: add_subdirectory (extern/jsoncpp EXCLUDE_FROM_ALL) With this change it's not possible to build this anymore Could you make this an Option which is default set to YES, but when used as a external library in other projects we can set this to NO ? |
This has caused me a problem Building jsoncpp today. In the end I had to comment the two new lines added in the CMakelists within the json folder. |
I forked this repo, and now use my copy with also these two lines removed @baylesj , @hjmjohnson , hope you can reconsider this patch |
@baylesj , it was a good try, but I guess we need to revert at least some part of this. What do you think? The objections from these users seem valid. |
Building directly inside the root of the source tree
can cause problems where the build intermediate files
overwrite or conflict with the intended source code
files.
This modification identifies this problem and
issues failure messages and suggestions to over
come the problem with more robust build suggestion.