summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorDāvis Mosāns <davispuh@gmail.com>2016-07-07 21:54:05 (GMT)
committerBrad King <brad.king@kitware.com>2016-07-18 13:51:01 (GMT)
commitb1f87a50b3aee129d420b8d789ebec55068e4ec5 (patch)
treee9223617c45d01c60a4c89c5d60dc0121a75a989 /Source/cmState.cxx
parent03407040d4d7d89fbb45e941a9dfb4257003a8a8 (diff)
downloadCMake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.zip
CMake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.tar.gz
CMake-b1f87a50b3aee129d420b8d789ebec55068e4ec5.tar.bz2
Use better KWSys SystemTools::GetEnv and HasEnv signatures
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index f2fe134..0470508 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -1286,8 +1286,9 @@ void cmState::Snapshot::SetDefaultDefinitions()
this->SetDefinition("CMAKE_HOST_UNIX", "1");
#endif
#if defined(__CYGWIN__)
- if (cmSystemTools::IsOn(
- cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32"))) {
+ std::string legacy;
+ if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) &&
+ cmSystemTools::IsOn(legacy.c_str())) {
this->SetDefinition("WIN32", "1");
this->SetDefinition("CMAKE_HOST_WIN32", "1");
}