Silence VS generator for missing CMakeLists.txt
CMake Makefile generators silently ignore missing CMakeLists.txt files and just treat the source directory as if it had an empty input file. This will be addressed with a new CMake Policy, but for now we make the VS generator consistent with the Makefile generator behavior. The VS generator will need to handle the OLD behavior of the policy anyway.
This commit is contained in:
parent
0af3b3b802
commit
0e8c7859c8
|
@ -266,6 +266,10 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
|
|||
std::string makefileIn = this->Makefile->GetStartDirectory();
|
||||
makefileIn += "/";
|
||||
makefileIn += "CMakeLists.txt";
|
||||
if(!cmSystemTools::FileExists(makefileIn.c_str()))
|
||||
{
|
||||
return;
|
||||
}
|
||||
std::string comment = "Building Custom Rule ";
|
||||
comment += makefileIn;
|
||||
std::string args;
|
||||
|
|
|
@ -246,6 +246,10 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
|
|||
makefileIn += "/";
|
||||
makefileIn += "CMakeLists.txt";
|
||||
makefileIn = cmSystemTools::CollapseFullPath(makefileIn.c_str());
|
||||
if(!cmSystemTools::FileExists(makefileIn.c_str()))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
std::string comment = "Building Custom Rule ";
|
||||
comment += makefileIn;
|
||||
std::string args;
|
||||
|
|
Loading…
Reference in New Issue