diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmMakefile.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 56e0ed9..813258d 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2340,17 +2340,19 @@ void cmMakefile::AddDefaultDefinitions() working, these variables are still also set here in this place, but they will be reset in CMakeSystemSpecificInformation.cmake before the platform files are executed. */ -#if defined(_WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) this->AddDefinition("WIN32", "1"); this->AddDefinition("CMAKE_HOST_WIN32", "1"); #else this->AddDefinition("UNIX", "1"); this->AddDefinition("CMAKE_HOST_UNIX", "1"); #endif - // Cygwin is more like unix so enable the unix commands #if defined(__CYGWIN__) - this->AddDefinition("UNIX", "1"); - this->AddDefinition("CMAKE_HOST_UNIX", "1"); + if(cmSystemTools::IsOn(cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32"))) + { + this->AddDefinition("WIN32", "1"); + this->AddDefinition("CMAKE_HOST_WIN32", "1"); + } #endif #if defined(__APPLE__) this->AddDefinition("APPLE", "1"); |