add a fatal error, and make sure c and c++ compilers work before using them

This commit is contained in:
Bill Hoffman
2003-01-21 12:50:48 -05:00
parent 110bc04bd0
commit 2f4ea98a4c
11 changed files with 116 additions and 21 deletions
+5 -1
View File
@@ -213,12 +213,14 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
{
if (!m_CMakeInstance->GetIsInTryCompile())
{
std::string ifpath = root + "/Modules/CMakeTestCCompiler.cmake";
mf->ReadListFile(0,ifpath.c_str());
// for old versions of CMake ListFiles
const char* versionValue
= mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
if (atof(versionValue) <= 1.4)
{
std::string ifpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
ifpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
mf->ReadListFile(0,ifpath.c_str());
}
}
@@ -227,6 +229,8 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
{
if (!m_CMakeInstance->GetIsInTryCompile())
{
std::string ifpath = root + "/Modules/CMakeTestCXXCompiler.cmake";
mf->ReadListFile(0,ifpath.c_str());
// for old versions of CMake ListFiles
const char* versionValue
= mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");