-
Notifications
You must be signed in to change notification settings - Fork 93
Update README with macOS build instructions #1810
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
2fc28ad
b7c1b57
803d397
d72f10b
7c820bd
b01e5aa
26af1f8
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 |
|---|---|---|
|
|
@@ -97,6 +97,26 @@ make | |
| Note: by using the `-G` option of `cmake` you can specify a generator, e.g. `cmake -G Xcode -DCMAKE_BUILD_TYPE=Release ..` will generate an Xcode project. | ||
| Please check `cmake --help` for more options. | ||
|
|
||
| ### Especially macOS | ||
|
|
||
| ```bash | ||
| git clone --recursive https://github.com/Return-To-The-Roots/s25client s25client | ||
| cd s25client | ||
| mkdir -p build && cd build | ||
| cmake .. \ | ||
| -DCMAKE_BUILD_TYPE=Release \ | ||
| -DCMAKE_OSX_ARCHITECTURES=arm64 \ | ||
| -DCMAKE_PREFIX_PATH="/opt/homebrew" \ | ||
| -DENABLE_TESTS=OFF \ | ||
|
Member
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. This likely doesn't has any effect. Which issue does this solve? |
||
| -DCMAKE_CXX_FLAGS="-std=c++17 \ | ||
|
Member
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. That is better done by |
||
| -Wno-error=missing-noreturn \ | ||
| -Wno-error=deprecated-copy \ | ||
| -Wno-error=unused-parameter \ | ||
| -Wno-error=undef \ | ||
| -Wno-error=cast-qual" .. | ||
|
Member
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. Do you really need that? If so we should fix it in the code so they are not required. Can you use |
||
| make -j$(sysctl -n hw.ncpu) | ||
| ``` | ||
|
|
||
| ### On Windows | ||
|
|
||
| #### Prerequisites | ||
|
|
||
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.
Why doesn't it work without that? We have code that should ensure it works out of the box
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.
CMAKE_OSX_ARCHITECTURESmay not contain arm64 by defaultThere 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.
By default it is empty. In that case we detect the supported architectures including arm64: https://github.com/Return-To-The-Roots/libutil/blob/7198609c21eae58c31cee5e88c76dc3eddea603f/cmake/DetectOsXArchs.cmake#L61
We then use
CMAKE_SYSTEM_PROCESSORto select that or all available archs. That is set touname -mby CMake.So my question is what exactly fails in the current workflow such that we can improve it for everyone.