Bladeren bron

cpack: Disable CMake Cygwin legacy warning while packaging

In cpack we load the platform information modules to give the
configuration scripts access to the host system information.
CYGWIN.cmake warns unless we explicitly tell it not to warn
since there is no chance for a cmake_minimum_required(VERSION)
to be called.
Brad King 10 jaren geleden
bovenliggende
commit
aca1d93bd9
1 gewijzigde bestanden met toevoegingen van 3 en 0 verwijderingen
  1. 3 0
      Source/CPack/cpack.cxx

+ 3 - 0
Source/CPack/cpack.cxx

@@ -203,6 +203,9 @@ int main (int argc, char const* const* argv)
   cmgg.SetCMakeInstance(&cminst);
   cmgg.SetCMakeInstance(&cminst);
   cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
   cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.CreateLocalGenerator());
   cmMakefile* globalMF = cmlg->GetMakefile();
   cmMakefile* globalMF = cmlg->GetMakefile();
+#if defined(__CYGWIN__)
+  globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
+#endif
 
 
   bool cpackConfigFileSpecified = true;
   bool cpackConfigFileSpecified = true;
   if ( cpackConfigFile.empty() )
   if ( cpackConfigFile.empty() )