cmake: Simplify MSYS support patch#2422
Conversation
|
There is a permission test that fails because MSYS uses I tried to change |
d51938f to
af6e098
Compare
|
Thanks! |
|
This link may be the answer to the question why ctest does not work http://cygwin.com/ml/cygwin/2013-11/msg00018.html. The symlink shortcut to the /bin /lib /share directories does not work properly in the cchache. You do not need it in cygwin because there is a virtual directory /usr mounted in binary mode. So we need a better version of gcc with the fortran -static option working. And parsing in grep sed. We also have an invalid c89 mode in gcc. You can try to compile the yasm package. |
|
The following tests FAILED: |
|
I now found that It's the same on Cygwin when Example: #include <unistd.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <fcntl.h>
#include <iostream>
const char fileName[] = "foo";
const int mask = S_IWRITE;
void get()
{
struct stat st;
stat(fileName, &st);
std::cout << (st.st_mode) << std::endl;
}
void set(int mode) {
chmod(fileName, mode);
}
int main() {
std::cout << std::oct;
close(open(fileName, O_WRONLY | O_CREAT));
get();
umask(mask);
set(0);
get();
set(mask);
get();
}Output: Without the |
|
Reported to cygwin: https://cygwin.com/pipermail/cygwin/2021-April/248208.html |
Instead of setting only MSYS, set both MSYS and CYGWIN. This enables using existing CYGWIN conditions without adapting them. It also makes the patch maintenance much easier. Fixes msys2#2419.
|
I found the root caused. Reported here: https://cygwin.com/pipermail/cygwin/2021-April/248241.html The problem is that when |
|
Do you prefer to rename the patch file back to |
|
Looks okish now. Some tests fail, but they fail also on cygwin. See my last comment on https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5969. |
|
I've built brotli and clang with this and all seems fine. Thanks! |
|
That was a long journey \o/ Thanks for the careful review. |
|
It hasn't been that careful ;) as my cmake knowledge is limited, but you seem to know your way around and I agree with the patch goal. |
Instead of setting only MSYS, set both MSYS and CYGWIN. This enables
using existing CYGWIN conditions without adapting them. It also
makes the patch maintenance much easier.
Fixes #2419.