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.
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.
Isn't this
--config Release
override the args above?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.
@axic, nope, the --config part is for stage 2 (build) and stage 3 (install), but not for stage 1 (bootstrap). That is exactly why it took me so long to catch. :-)
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.
So CMake ignores
CMAKE_BUILD_TYPE
variable when generating for Visual Studio because it's multi-configuration generator and the config is requested with--config Release
(or via dropdown menu in VS).I expect the jsoncpp's CMake script incorrectly checks
CMAKE_BUILD_TYPE
on Windows and that's why this fix works.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.
Do we want to leave a comment in there explaining this? Also anybody feels like checking jsoncpp's cmake file and fixing it? :)
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.
@chfast so I checked the build files of jsoncpp, and it's not reading the
CMAKE_BUILD_TYPE
var when compiling on Windows platform. So I am inclined to believe that VS2017 (at least) is interpreting this value when using the native builtin cmake support (FYI: I do not generate .sln files with cmake but open theCMakeLists.txt
as solution file instead.)I'll close this ticket however, because the other PR makes this PR redundant. Thanks anyways. :-)