Skip to content

Conversation

@christianparpart
Copy link
Contributor

As a companion PR to #4467, this PR actually not just fixes building Release mode on VS2017, but also supports Debug modes by not hard-coding nor forcing to Release-mode.

This is actually necessary to properly develop'n'debug using VS2017.

  • I also made some minor changes to .gitignore that I do not want to create a seperate PR for (too small)
  • along the way, I found that cmake was hard-coded too, some lines below ExternalProject_Add, so I adapted that one, too.

# Overwrite build and install commands to force Release build on MSVC.
BUILD_COMMAND cmake --build <BINARY_DIR> --config Release
INSTALL_COMMAND cmake --build <BINARY_DIR> --config Release --target install
BUILD_COMMAND ${JSONCPP_CMAKE_COMMAND} --build <BINARY_DIR> --config ${CMAKE_BUILD_TYPE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That will not work reliably. If you want to use Debug build of jsoncpp in VS, remove both BUILD_COMMAND and INSTALL_COMMAND.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chfast, this is an interesting point. I'm removing those two three then.

@christianparpart christianparpart force-pushed the vs2017-build-fix-ideal branch from 734a1bb to 7d67a66 Compare July 10, 2018 13:38
@chriseth
Copy link
Contributor

Please merge if @chfast approves.

chriseth
chriseth previously approved these changes Jul 10, 2018
chfast
chfast previously approved these changes Jul 10, 2018
Copy link
Contributor

@chfast chfast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok to me, but I'll wait for Windows build.
Problems with emscripten?

@christianparpart christianparpart dismissed stale reviews from chfast and chriseth via 230317e July 10, 2018 17:11
@christianparpart christianparpart force-pushed the vs2017-build-fix-ideal branch from 7d67a66 to 230317e Compare July 10, 2018 17:11
@christianparpart
Copy link
Contributor Author

@chfast I may have been using an old develop branch as base of this PR. I've rebased now, and wait for the results. (@ekpyron hinted, that those errors may be due to gnosis, which should be disabled.)

@christianparpart christianparpart merged commit 49cc1b8 into develop Jul 10, 2018
@christianparpart christianparpart deleted the vs2017-build-fix-ideal branch July 10, 2018 19:38
resonant-riches added a commit to ChorusOne/azimuth-cli that referenced this pull request Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants