mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Fix if() checks of CMAKE_SYSTEM_NAME on Cygwin
The CMAKE_SYSTEM_NAME is "CYGWIN", but we also define a variable named "CYGWIN" to "1". Avoid allowing if() to expand the "CYGWIN" string as a variable.
This commit is contained in:
+1
-1
@@ -50,7 +50,7 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
if(NOT DEFINED CPACK_SYSTEM_NAME)
|
||||
# make sure package is not Cygwin-unknown, for Cygwin just
|
||||
# cygwin is good for the system name
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "CYGWIN")
|
||||
if("x${CMAKE_SYSTEM_NAME}" STREQUAL "xCYGWIN")
|
||||
set(CPACK_SYSTEM_NAME Cygwin)
|
||||
else()
|
||||
set(CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
Reference in New Issue
Block a user