summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-04-27 17:49:58 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-04-27 17:50:09 (GMT)
commit893a5108c58593de362736947147e50228edf88a (patch)
tree9bbe9aa646b48144550370f54fc0ffdc3c762772 /Source
parent0eb42defc222372b660983ac46ea1266543af7e0 (diff)
parent231df230d5894649dc7e85d0204226e9e87973c2 (diff)
downloadCMake-893a5108c58593de362736947147e50228edf88a.zip
CMake-893a5108c58593de362736947147e50228edf88a.tar.gz
CMake-893a5108c58593de362736947147e50228edf88a.tar.bz2
Merge topic 'msys-simple'
231df230d5 Help: Add release note for MSYS runtime support ddcd1469e8 MSYS: Add support for running under MSYS runtime environment b3ca4f9ad1 cm/filesystem: Work around crash when compiled for CYGWIN/MSYS runtime c9aec3d4a9 FindCurses: Do not assume ncurses is installed on CYGWIN Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5969
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt2
-rw-r--r--Source/Checks/cm_cxx_features.cmake4
-rw-r--r--Source/Modules/FindLibUUID.cmake9
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx2
-rw-r--r--Source/cmSystemTools.cxx6
5 files changed, 18 insertions, 5 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 938745c..c19c154 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -44,7 +44,7 @@ endif()
if(NOT CMake_DEFAULT_RECURSION_LIMIT)
if(DEFINED ENV{DASHBOARD_TEST_FROM_CTEST})
set(CMake_DEFAULT_RECURSION_LIMIT 100)
- elseif(MINGW)
+ elseif(MINGW OR MSYS)
set(CMake_DEFAULT_RECURSION_LIMIT 400)
elseif(WIN32 AND CMAKE_C_COMPILER_ID STREQUAL "IntelLLVM")
set(CMake_DEFAULT_RECURSION_LIMIT 600)
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 7917d41..f20572e 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -80,7 +80,9 @@ if(CMake_HAVE_CXX_MAKE_UNIQUE)
set(CMake_HAVE_CXX_UNIQUE_PTR 1)
endif()
cm_check_cxx_feature(unique_ptr)
-if (NOT CMAKE_CXX_STANDARD LESS "17")
+if (NOT CMAKE_CXX_STANDARD LESS "17"
+ AND NOT MSYS # FIXME: RunCMake.cmake_path cases crash with MSYS std::filesystem
+ )
if (NOT CMAKE_CROSSCOMPILING OR CMAKE_CROSSCOMPILING_EMULATOR)
cm_check_cxx_feature(filesystem TRY_RUN)
else()
diff --git a/Source/Modules/FindLibUUID.cmake b/Source/Modules/FindLibUUID.cmake
index 17f11c1..ca5b61d 100644
--- a/Source/Modules/FindLibUUID.cmake
+++ b/Source/Modules/FindLibUUID.cmake
@@ -40,7 +40,14 @@ They may be set by end users to point at LibUUID components.
#]=======================================================================]
#-----------------------------------------------------------------------------
-if(CYGWIN)
+if(MSYS)
+ # Note: on current version of MSYS2, linking to libuuid.dll.a doesn't
+ # import the right symbols sometimes. Fix this by linking directly
+ # to the DLL that provides the symbols, instead.
+ find_library(LibUUID_LIBRARY
+ NAMES msys-uuid-1.dll
+ )
+elseif(CYGWIN)
# Note: on current version of Cygwin, linking to libuuid.dll.a doesn't
# import the right symbols sometimes. Fix this by linking directly
# to the DLL that provides the symbols, instead.
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index ccfd727..5fbbef7 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -655,7 +655,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
xml.EndElement(); // extension
} else {
std::string systemName = mf->GetSafeDefinition("CMAKE_SYSTEM_NAME");
- if (systemName == "CYGWIN") {
+ if (systemName == "CYGWIN" || systemName == "MSYS") {
xml.StartElement("extension");
xml.Attribute("id", "org.eclipse.cdt.core.Cygwin_PE");
xml.Attribute("point", "org.eclipse.cdt.core.BinaryParser");
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 5382fac..aad5533 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -3239,10 +3239,14 @@ cm::string_view cmSystemTools::GetSystemName()
systemName = "kFreeBSD";
}
- // fix for CYGWIN which has windows version in it
+ // 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 "";