Browse Source

BUG: Change generated try-compile projects to use cmake_minimum_required instead of cmake_policy to set the version now that CMP0000 requires it.

Brad King 17 years ago
parent
commit
16b32f9c9b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/cmCoreTryCompile.cxx

+ 1 - 1
Source/cmCoreTryCompile.cxx

@@ -175,7 +175,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
     const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator()
                         ->GetLanguageFromExtension(ext.c_str()));
     const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");
-    fprintf(fout, "cmake_policy(VERSION %u.%u)\n",
+    fprintf(fout, "cmake_minimum_required(VERSION %u.%u)\n",
             cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion());
     if(def)
       {