-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
Update build docs for windows #528
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -112,6 +112,27 @@ install | |||||||||
|
||||||||||
Please refer to the CMake Manual for more details. | ||||||||||
|
||||||||||
**Windows**: | ||||||||||
Different configurations have different run-time requirements. The `Debug` | ||||||||||
configuration uses the windows debug C runtime, whereas the `RelWithDebInfo` | ||||||||||
does not. This may determine which version you can use with your executable. | ||||||||||
|
||||||||||
Some special notes regarding `cmake`: | ||||||||||
- cmake doesn't need the configuration int the `-B` step since it creates | ||||||||||
all the `*.vcxproj` files at once. | ||||||||||
- for `cmake --build`, **do no** specify `--parallel`, but **do** specify your | ||||||||||
`--config RelWithDebInfo` or whichever configuration is appropriate. | ||||||||||
Comment on lines
+123
to
+124
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its unfortunate that Lines 138 to 141 in 06d4360
Though I’m not really sure if there might be a better way here. Documentation is quite bad :-( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right but the point I was trying to make was that if you do add --parallel, then the build step will only create the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ohhh, I think in that case it might be a different manifestation of #512, which means that cmakes option parsing is broken There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could be. Don't know what the best solution is. Only that I am not an avid cmake user myself and always struggle a bit when using it. Wanted to help save people from the problems I had :) |
||||||||||
|
||||||||||
In short, do something like | ||||||||||
``` | ||||||||||
> cmake -B build | ||||||||||
> cmake --build build --config RelWithDebInfo | ||||||||||
> cmake --install build --prefix install --config RelWithDebInfo | ||||||||||
``` | ||||||||||
|
||||||||||
In addition to the optional `winhttp.lib`, windows builds require linking | ||||||||||
with `version.lib` and `dbghelp.lib` | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, but it probably ought to be pointed out to users of the |
||||||||||
|
||||||||||
**Android**: | ||||||||||
|
||||||||||
The CMake project can also be configured to correctly work with the Android NDK, | ||||||||||
|
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.
What do you mean by that? The
-B
flag specifies the output directory of the VC project, otherwise it would just clutter the working directory.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.
Sorry, that was unclear. You don't need the
-DCMAKE_BUILD_TYPE=RelWithDebInfo
setting there, although it is harmless. All the configurations are embedded in the resulting .vcxproj files.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.
You do not need it in case of MSVS generator or other multi-configuration projects, but you can use
-G Ninja
for example. In case of Ninja or Make you should specify build type.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.
Right you are. So it may well be left in place though. It is harmless enough :)