diff options
author | Brad King <brad.king@kitware.com> | 2024-02-02 15:28:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2024-02-02 15:28:54 (GMT) |
commit | b8ee9db223562a317e76b8ea6f9224efc8da179e (patch) | |
tree | 04c3d40b3344c8a246f2d1fbe4281738a754e2f6 /Source | |
parent | 8d01a388f1a17da3104e4cfc79950fa3d3fd03e3 (diff) | |
parent | 607051f2660d2586c9dc6c021b22273f694caab3 (diff) | |
download | CMake-b8ee9db223562a317e76b8ea6f9224efc8da179e.zip CMake-b8ee9db223562a317e76b8ea6f9224efc8da179e.tar.gz CMake-b8ee9db223562a317e76b8ea6f9224efc8da179e.tar.bz2 |
Merge topic 'msys-system-name'
607051f266 MSYS,CYGWIN: Hard-code host system names when built for these runtimes
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Peter Kokot <peterkokot@gmail.com>
Merge-request: !9213
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 18ca85b..3b70543 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -3697,6 +3697,10 @@ cm::string_view cmSystemTools::GetSystemName() { #if defined(_WIN32) return "Windows"; +#elif defined(__MSYS__) + return "MSYS"; +#elif defined(__CYGWIN__) + return "CYGWIN"; #elif defined(__ANDROID__) return "Android"; #else @@ -3725,15 +3729,6 @@ cm::string_view cmSystemTools::GetSystemName() if (systemName.find("kFreeBSD") != cm::string_view::npos) { systemName = "kFreeBSD"; } - - // fix for CYGWIN and MSYS which have windows version in them - if (systemName.find("CYGWIN") != cm::string_view::npos) { - systemName = "CYGWIN"; - } - - if (systemName.find("MSYS") != cm::string_view::npos) { - systemName = "MSYS"; - } return systemName; } return ""; |