[msvc] cmake linking: msvc will not wait for spark_generated.h to be generated without creating and setting post-generation target as dependency #112
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.
Issue: Spark_generated.h and similar headers generated during compile is not waited upon by msvc even when setting the target as a dependency.
Solution: Make a post-generation target and make the modules depend upon that instead as that will force msvc to ensure the headers are actually generated before they're needed.
Windows should now successfully build the first time. This is crucial preliminary work for the windows buildrunner as it cannot fail any step unlike locally where we can just re-build (as msvc seems to generate them right after they're needed and then failing, but them now existing in the build directory so a subsequent dirty build will succeed).
Also pulled out the schema headers from where they are actually not needed, only 2 modules depend upon them; rpcgen and spark.