ENH: make sure policy is set in generated cmakelist files
This commit is contained in:
parent
5588ed47fc
commit
ff445e3fd0
|
@ -175,6 +175,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv)
|
||||||
const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator()
|
const char* lang =(this->Makefile->GetCMakeInstance()->GetGlobalGenerator()
|
||||||
->GetLanguageFromExtension(ext.c_str()));
|
->GetLanguageFromExtension(ext.c_str()));
|
||||||
const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");
|
const char* def = this->Makefile->GetDefinition("CMAKE_MODULE_PATH");
|
||||||
|
fprintf(fout, "cmake_policy(VERSION 2.6)\n");
|
||||||
if(def)
|
if(def)
|
||||||
{
|
{
|
||||||
fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def);
|
fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def);
|
||||||
|
|
Loading…
Reference in New Issue