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
Include entire src tree in multiconfig projects: #2707
Conversation
Jenkins Build SummaryBuilt from this commit Built at 20181010 - 15:58:54 Test Results
|
CMakeLists.txt
Outdated
@@ -2354,6 +2364,7 @@ if (is_multiconfig) | |||
group_sources(src) | |||
group_sources(docs) | |||
group_sources(Builds) | |||
group_sources(.nih_c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you might want to group_sources(${nih_cache_path})
instead, which gives just the cache portion for the relevant compiler/generator combo. That said, on xcode this ends-up only including the files which were gotten via FetchContent on the first run (when this cache is clean). On subsequent runs, it's very likely this will contain the other ExternalProject files as well - just something to be aware of I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this (and a couple of relative path variations). Because of the way that group_sources
is implemented, it doesn't work as-is. Also, without it, if you've got multiple config types (eg MSVC and ninja) then the other files will still be at the top of the tree (the files stuck at the top of the tree is why I added this in the first place).
Now the bigger issue is that the only reason (as far as I can tell) that .nih_c
is relevant is because we search for all .md
files in the repo, and there are several under .nih_c
. I think the better way to do this is to only do Builds/*.md docs/*.md src/*.md
(which will still be relevant accounting for your suggestion below).
CMakeLists.txt
Outdated
@@ -2337,7 +2338,16 @@ endif () | |||
|
|||
if (is_multiconfig) | |||
# Rippled headers. Only useful for IDEs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this comment doesn't apply any more and needs updating - maybe something like "This code finds all source files in the src subdirectory for inclusion in the IDE file tree as non-compiled sources. Since this file list will have some overlap with files we have already added to our targets to be compiled, we explicitly remove any of these target source files from this list."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Looks like it correctly builds an Xcode project for me. Also debug and unity command line builds are working for me on mac OS.
👍 mac OS Xcode and command line builds are still working for me with the latest changes. |
* For example Visual Studio, XCode. This will allow easily working with any file in the IDE. * Also ignore the file created by Visual Studio when using cmake integration. * Use conditional for unity/nounity sources (h/t @mellery451)
b0f7845
to
e4acb0a
Compare
In 1.2.0-b3 |
any file in the IDE.
integration.
Note: This change is based off of #2703 to increase the chances of the Jenkins build passing. Please ignore the "Add dependency for NuDB ExternalProject" commit.
Assignees: