summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-11-27 18:34:31 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2012-11-27 18:34:31 (GMT)
commit9c48fc7213c2a7426a2c1713653484aa58beebcb (patch)
tree58693c8bd3f4390d6e5b9083359ce5292e290421 /Source
parent4046fc01041e1bd9ece928bd77d494c38cc0c70a (diff)
parent7ae7d6650344f7a36216af8424abbf0b834688d1 (diff)
downloadCMake-9c48fc7213c2a7426a2c1713653484aa58beebcb.zip
CMake-9c48fc7213c2a7426a2c1713653484aa58beebcb.tar.gz
CMake-9c48fc7213c2a7426a2c1713653484aa58beebcb.tar.bz2
Merge topic 'fix-13392-nmake-empty-depends-problem'
7ae7d66 NMake: Fix problem with empty DEPENDS args (#13392) 078e35d NMake: Add a test to demonstrate EmptyDepends issue (#13392)
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 4952a8c..d48f43a 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1875,6 +1875,14 @@ bool cmLocalGenerator::GetRealDependency(const char* inName,
// modify the name so stripping down to just the file name should
// produce the target name in this case.
std::string name = cmSystemTools::GetFilenameName(inName);
+
+ // If the input name is the empty string, there is no real
+ // dependency. Short-circuit the other checks:
+ if(name == "")
+ {
+ return false;
+ }
+
if(cmSystemTools::GetFilenameLastExtension(name) == ".exe")
{
name = cmSystemTools::GetFilenameWithoutLastExtension(name);