-
Notifications
You must be signed in to change notification settings - Fork 445
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
Add 'windows-mingw-release' CMake preset #3421
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8846fba
Fixes compilation error "ResourceSet.h:33:21: error: function 'Resour…
Kuxe 3536e21
Add 'windows-mingw-release' to CMakePresets.json
Kuxe 30b851d
Merge branch 'develop' of https://github.com/vcmi/vcmi into windows_m…
Kuxe 100664e
Fix compilation error where gcc 12.1.0 (MinGW) errors with "writing 1…
Kuxe eeab16a
Enable ccache support for MinGW
Kuxe a78a3b3
Added documentation on how to build using windows-mingw-release preset
Kuxe c8ed138
Use statically linked Qt5 for Windows MinGW builds. This solves an is…
Kuxe 491dfd8
Remove platform related checks for setting 'CMAKE_C(XX)_COMPILER_LAUN…
Kuxe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
iirc there's a
GNU
checkThere 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.
I think that'd include installations of GCC on osx, which is not something I've tested
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.
which is not something anyone has ever tested :)
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.
yep, so let's keep
MinGW
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.
well, what about Makefile or Ninja generator on macOS regardless of the compiler? They should also work by simply specifying the "compiler launcher".
I'd rather just add a check for those generators here (maybe excluding Windows OS, not sure how ccache works there in command-line builds).
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.
Not sure what you mean by
this PR is for Windows, using the
gcc
port mingw-w64 that is used on host-os Windows targeting Windows (not cross-compilation). I know mingw can be used to cross-compile on Linux targeting Windows, but that's unrelated to this PR. I could rewrite it intoso I don't wind up unintentionally supporting ccache for platforms using MinGW other than windows (only such case would be cross-compilation from linux to windows afaik).. but I thought that was a nice side-effect so I just skipped checking for
CMAKE_HOST_WIN32
.I just now found out there's no
GNU
-variable in CMake (I also thought it did exist), at least not listed here: https://cmake.org/cmake/help/latest/manual/cmake-variables.7.htmlI'm all for supporting other platforms with ccache :), but it's out of scope of this PR
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.
my main remark is that instead of adding every single platform or compiler here we should instead check the CMake generator that's used. I definitely know that ccache works through the standard compiler launcher variables for Makefile and Ninja generators, and definitely neither for Xcode nor for Visual Studio (that's already handled separately).
right, was thinking about msvc :)
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.
Ah, now I see what you mean. I'll make a new commit. EDIT: See #3421 (comment)