diff options
author | Brad King <brad.king@kitware.com> | 2010-12-14 14:36:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-14 21:36:55 (GMT) |
commit | 2afb820352845513d46af1464cb1161e335eb435 (patch) | |
tree | 38fdf071aa9f2889585a70e8d344844af66c631f /Source/cmCoreTryCompile.cxx | |
parent | b90e9f9c3a61294b40bd45cada70c24d35bc705d (diff) | |
download | CMake-2afb820352845513d46af1464cb1161e335eb435.zip CMake-2afb820352845513d46af1464cb1161e335eb435.tar.gz CMake-2afb820352845513d46af1464cb1161e335eb435.tar.bz2 |
Write full version into try_compile CMakeLists
Pass the full version to cmake_minimum_required(VERSION) in generated
CMake files for try_compile projects. This tells CMake not to use any
backward compatibility behavior while processing code it generates.
Diffstat (limited to 'Source/cmCoreTryCompile.cxx')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index b8a0c95..a1c707d 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -169,8 +169,9 @@ 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_minimum_required(VERSION %u.%u)\n", - cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion()); + fprintf(fout, "cmake_minimum_required(VERSION %u.%u.%u.%u)\n", + cmVersion::GetMajorVersion(), cmVersion::GetMinorVersion(), + cmVersion::GetPatchVersion(), cmVersion::GetTweakVersion()); if(def) { fprintf(fout, "SET(CMAKE_MODULE_PATH %s)\n", def); |