Use Shared Items Projects to gather the .cpp files exported by each project #3796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR attempts to alleviate the pain of having "
cbrt.cpp
in every project". It doesn't try to do anything with modularization so it's not a fix for #3323: it only move the shared.cpp
files to shared project, not all the non-test files as intended by #3323.For each project such as
numerics
that exports.cpp
files for use by other projects, I am creating a shared project located atshared\numerics.vcxproj
. The shared project containscbrt.cpp
(which still lives atnumerics\cbrt.cpp
) and is referenced by all the projects which needcbrt.cpp
(or any other.cpp
file fromnumerics
). In the Visual Studio Solution Explorer shared projects are located in a virtual folder and things look like this:Note that I am not doing this for
ksp_plugin
. That one is special, we'll see what we want to do.Benefits:
Source Files
filter with files that live elsewhere.third_party_zfp.props
in every project, that's done once inshared\base.vcxproj
..cpp
file gets exported fromnumerics
, it just need to be added toshared\numerics.vcxproj
and (possibly) a reference added to the client projects (in practice pretty much everyone pullsnumerics
already).Drawbacks:
cbrt.cpp
but not the elliptic functions, it will now import everything.