Commit 0e8c7859 authored by Brad King's avatar Brad King
Browse files

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.
parent 0af3b3b8
...@@ -266,6 +266,10 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt) ...@@ -266,6 +266,10 @@ void cmLocalVisualStudio6Generator::AddDSPBuildRule(cmTarget& tgt)
std::string makefileIn = this->Makefile->GetStartDirectory(); std::string makefileIn = this->Makefile->GetStartDirectory();
makefileIn += "/"; makefileIn += "/";
makefileIn += "CMakeLists.txt"; makefileIn += "CMakeLists.txt";
if(!cmSystemTools::FileExists(makefileIn.c_str()))
{
return;
}
std::string comment = "Building Custom Rule "; std::string comment = "Building Custom Rule ";
comment += makefileIn; comment += makefileIn;
std::string args; std::string args;
......
...@@ -246,6 +246,10 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule() ...@@ -246,6 +246,10 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
makefileIn += "/"; makefileIn += "/";
makefileIn += "CMakeLists.txt"; makefileIn += "CMakeLists.txt";
makefileIn = cmSystemTools::CollapseFullPath(makefileIn.c_str()); makefileIn = cmSystemTools::CollapseFullPath(makefileIn.c_str());
if(!cmSystemTools::FileExists(makefileIn.c_str()))
{
return 0;
}
std::string comment = "Building Custom Rule "; std::string comment = "Building Custom Rule ";
comment += makefileIn; comment += makefileIn;
std::string args; std::string args;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment