Commit 893a5108 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'msys-simple'

231df230 Help: Add release note for MSYS runtime support
ddcd1469 MSYS: Add support for running under MSYS runtime environment
b3ca4f9a cm/filesystem: Work around crash when compiled for CYGWIN/MSYS runtime
c9aec3d4

 FindCurses: Do not assume ncurses is installed on CYGWIN
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !5969
parents 0eb42def 231df230
msys
----
* CMake now supports the MSYS runtime environment, much like CYGWIN.
......@@ -27,6 +27,7 @@
# Tru64 Tru64
# Ultrix ULTRIX
# cygwin CYGWIN_NT-5.1
# MSYS MSYS_NT-6.1
# MacOSX Darwin
......@@ -43,7 +44,7 @@ if(CMAKE_HOST_UNIX)
else()
exec_program(${CMAKE_UNAME} ARGS -r OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION)
endif()
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|^GNU$|Android")
if(CMAKE_HOST_SYSTEM_NAME MATCHES "Linux|CYGWIN.*|MSYS.*|^GNU$|Android")
exec_program(${CMAKE_UNAME} ARGS -m OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR
RETURN_VALUE val)
elseif(CMAKE_HOST_SYSTEM_NAME MATCHES "Darwin")
......
......@@ -5,6 +5,9 @@
#if defined(__linux) || defined(__linux__) || defined(linux)
# define PLATFORM_ID "Linux"
#elif defined(__MSYS__)
# define PLATFORM_ID "MSYS"
#elif defined(__CYGWIN__)
# define PLATFORM_ID "Cygwin"
......
......@@ -14,6 +14,7 @@
set(APPLE )
set(UNIX )
set(CYGWIN )
set(MSYS )
set(WIN32 )
......
......@@ -76,7 +76,7 @@ endif()
# cygwin ncurses stopped providing curses.h symlinks see above
# message. Cygwin is an ncurses package, so force ncurses on
# cygwin if the curses.h is missing
if(CYGWIN)
if(CURSES_NCURSES_LIBRARY AND CYGWIN)
if (CURSES_NEED_WIDE)
if(NOT EXISTS /usr/include/ncursesw/curses.h)
set(CURSES_USE_NCURSES TRUE)
......
......@@ -225,7 +225,7 @@ if(CMAKE_USE_PTHREADS_INIT)
set(CMAKE_THREAD_LIBS_INIT )
endif()
if(CMAKE_SYSTEM MATCHES "CYGWIN_NT")
if(CMAKE_SYSTEM MATCHES "CYGWIN_NT" OR CMAKE_SYSTEM MATCHES "MSYS_NT")
set(CMAKE_USE_PTHREADS_INIT 1)
set(Threads_FOUND TRUE)
set(CMAKE_THREAD_LIBS_INIT )
......
if("${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS "2.8.3.20101214")
if("${CMAKE_MINIMUM_REQUIRED_VERSION}" VERSION_LESS "2.8.3.20101214" AND NOT MSYS)
set(__USE_CMAKE_LEGACY_CYGWIN_WIN32 1)
endif()
if(NOT DEFINED WIN32)
if(NOT DEFINED WIN32 AND NOT MSYS)
set(WIN32 0)
if(DEFINED __USE_CMAKE_LEGACY_CYGWIN_WIN32)
if(NOT DEFINED CMAKE_LEGACY_CYGWIN_WIN32
......
include(Platform/CYGWIN-Clang-C)
include(Platform/CYGWIN-Clang-CXX)
include(Platform/CYGWIN-Determine-CXX)
include(Platform/CYGWIN-GNU-C)
include(Platform/CYGWIN-GNU-CXX)
include(Platform/CYGWIN-GNU-Fortran)
include(Platform/CYGWIN-GNU)
include(Platform/CYGWIN-windres)
set(MSYS 1)
include(Platform/CYGWIN)
set(CMAKE_SHARED_LIBRARY_PREFIX "msys-")
set(CMAKE_SHARED_MODULE_PREFIX "msys-")
......@@ -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)
......
......@@ -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()
......
......@@ -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.
......
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment