-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Windows: tell cmake it's not crosscompiling in MSYS2 #4339
Conversation
This fixes a cmake error in MSYS2 introduced by monero-project#4294
While I know sfa about cmake/windows, this seems unconditional. Will this actually break cross compiling ? |
That's why I used the CMAKE_HOST_WIN32 check, so if host is not Windows it should still work. |
OK, but that doesn't mean the host is different from the target, does it ? |
How would you interpret this ?
That's without the patch. https://cmake.org/cmake/help/v3.0/variable/CMAKE_CROSSCOMPILING.html |
I interpret this as "I'm going to cross compile". My point, however, is that I read the change as "if the host is win32, assume we're not cross compiling", without checking the target, which seems wrong unless there's a subtlety I'm missing. |
Those cmake toolchain files are only used in release-static-win32 and release-static-win64 targets. Maybe I'm missing something ? EDIT: And their debug equivalents. |
Ah, that does explain then, the target is already fixed :) Thanks |
Hmm, another way of fixing this would be to remove this line. Then Relevant cmake vars with L29:
Relevant cmake vars without L29:
|
I understood it as a way to preserve file permissions when they will be moved to windows, but this could be completely wrong! So, imho, tl;dr i vote for @iDunk5400 second solution |
I agree that not setting |
This fixes a cmake error in MSYS2 introduced by #4294