only load bw compat if CMAKE_BACK... is set
This commit is contained in:
parent
26bc729933
commit
5c92fa4879
@ -204,8 +204,8 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
|
|||||||
{
|
{
|
||||||
// for old versions of CMake ListFiles
|
// for old versions of CMake ListFiles
|
||||||
const char* versionValue
|
const char* versionValue
|
||||||
= mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
|
= mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
|
||||||
if (!versionValue || atof(versionValue) <= 1.4)
|
if (atof(versionValue) <= 1.4)
|
||||||
{
|
{
|
||||||
std::string ifpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
|
std::string ifpath = root + "/Modules/CMakeBackwardCompatibilityC.cmake";
|
||||||
mf->ReadListFile(0,ifpath.c_str());
|
mf->ReadListFile(0,ifpath.c_str());
|
||||||
@ -218,8 +218,8 @@ void cmGlobalGenerator::EnableLanguage(const char* lang,
|
|||||||
{
|
{
|
||||||
// for old versions of CMake ListFiles
|
// for old versions of CMake ListFiles
|
||||||
const char* versionValue
|
const char* versionValue
|
||||||
= mf->GetDefinition("CMAKE_MINIMUM_REQUIRED_VERSION");
|
= mf->GetDefinition("CMAKE_BACKWARDS_COMPATIBILITY");
|
||||||
if (!versionValue || atof(versionValue) <= 1.4)
|
if (atof(versionValue) <= 1.4)
|
||||||
{
|
{
|
||||||
std::string nfpath = root + "/Modules/CMakeBackwardCompatibilityCXX.cmake";
|
std::string nfpath = root + "/Modules/CMakeBackwardCompatibilityCXX.cmake";
|
||||||
mf->ReadListFile(0,nfpath.c_str());
|
mf->ReadListFile(0,nfpath.c_str());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user