소스 검색

ENH: make sure policy is set in generated cmakelist files

Bill Hoffman 18 년 전
부모
커밋
ff445e3fd0
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      Source/cmCoreTryCompile.cxx

+ 1 - 0
Source/cmCoreTryCompile.cxx

@@ -175,6 +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 2.6)\n");
     if(def)
       {
       fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def);