summaryrefslogtreecommitdiff
path: root/CMakeCPack.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-09-09 09:09:57 -0400
committerNils Gladitz <nilsgladitz@gmail.com>2014-09-11 21:23:24 +0200
commit858d5a0b3e52dbae635fac5a6944fba23a362f5b (patch)
tree76f2be038609faeb88abfb1d02826aec6250d659 /CMakeCPack.cmake
parente177e7affb10fc25b71d4c9d9796c9df7fcdb800 (diff)
downloadcmake-858d5a0b3e52dbae635fac5a6944fba23a362f5b.tar.gz
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.
Diffstat (limited to 'CMakeCPack.cmake')
-rw-r--r--CMakeCPack.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 66ec900a5d..22ca8cfa1a 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -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})