From ff445e3fd0c6164b7fe97fbee8a9c01c9090f15a Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Thu, 6 Mar 2008 15:20:39 -0500 Subject: [PATCH] ENH: make sure policy is set in generated cmakelist files --- Source/cmCoreTryCompile.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 77aab0da9..7a9a6cd7a 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -175,6 +175,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector 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 2.6)\n"); if(def) { fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def);