summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-04 20:39:31 (GMT)
committerBrad King <brad.king@kitware.com>2015-08-04 20:40:13 (GMT)
commitc4d2f64f3c9dea3a5fcd8af5bb389db00ccd64df (patch)
tree596b19e548936fa12d6c0d5b1058a82e4a333d88 /Source
parent3a0db0223b8c10cfaa6984253d794ab97425adf9 (diff)
downloadCMake-c4d2f64f3c9dea3a5fcd8af5bb389db00ccd64df.zip
CMake-c4d2f64f3c9dea3a5fcd8af5bb389db00ccd64df.tar.gz
CMake-c4d2f64f3c9dea3a5fcd8af5bb389db00ccd64df.tar.bz2
add_subdirectory: Fix error message on missing CMakeLists.txt (#15680)
Refactoring in commit v3.3.0-rc1~76^2 (cmMakefile: Handle CMP0014 before configuring the generator, 2015-05-14) accidentally left the file name "/CMakeLists.txt" in the error message. Remove it and add a test case.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmMakefile.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ee6c1da..bdc55f2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1564,8 +1564,8 @@ void cmMakefile::ConfigureSubDirectory(cmLocalGenerator *lg2)
cmSystemTools::Message(msg.c_str());
}
- currentStart += "/CMakeLists.txt";
- if(!cmSystemTools::FileExists(currentStart.c_str(), true))
+ std::string const currentStartFile = currentStart + "/CMakeLists.txt";
+ if (!cmSystemTools::FileExists(currentStartFile, true))
{
// The file is missing. Check policy CMP0014.
std::ostringstream e;