diff options
author | Brad King <brad.king@kitware.com> | 2008-03-07 13:53:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-03-07 13:53:22 (GMT) |
commit | 1d23ea1a2de47e16929557e169b7fb041236f5d3 (patch) | |
tree | ff3d176d6f884dcd9fd5554d3db929359410fac2 /Source/cmCoreTryCompile.cxx | |
parent | 680104a490250f7b56b67aa3cbb7c113d997e93c (diff) | |
download | CMake-1d23ea1a2de47e16929557e169b7fb041236f5d3.zip CMake-1d23ea1a2de47e16929557e169b7fb041236f5d3.tar.gz CMake-1d23ea1a2de47e16929557e169b7fb041236f5d3.tar.bz2 |
BUG: Generated try-compile CMakeLists.txt file should call cmake_policy with the current version of CMake, not just 2.6.
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 7a9a6cd..a24c1ee 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -175,7 +175,8 @@ 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"); + fprintf(fout, "cmake_policy(VERSION %u.%u)\n", + cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion()); if(def) { fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def); |