Merge topic 'try-compile-min-version'

2afb820 Write full version into try_compile CMakeLists
This commit is contained in:
Brad King 2010-12-16 14:00:24 -05:00 committed by CMake Topic Stage
commit 6b61c04330
1 changed files with 3 additions and 2 deletions

View File

@ -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);