diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-14 19:12:02 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2005-07-14 19:12:02 (GMT) |
commit | a9692f0a18b6304c9e5195591df1bf67eefd14e3 (patch) | |
tree | e5ef130cf367b58f3e6782c35723add7b70aaf10 /Source/cmMakefile.cxx | |
parent | 0d14b57605c62b69ddc756eff5f2dca2d6f495d7 (diff) | |
download | CMake-a9692f0a18b6304c9e5195591df1bf67eefd14e3.zip CMake-a9692f0a18b6304c9e5195591df1bf67eefd14e3.tar.gz CMake-a9692f0a18b6304c9e5195591df1bf67eefd14e3.tar.bz2 |
BUG: fix for bug 1850 wrapping can leave out files if they are a substring of another file
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1bd2115..1741b06 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1157,8 +1157,11 @@ cmSourceFile *cmMakefile::GetSourceFileWithOutput(const char *cname) { // is the output of the custom command match the source files name out = (*i)->GetCustomCommand()->GetOutput(); - if (out.rfind(name) != out.npos && - out.rfind(name) == out.size() - name.size()) + std::string::size_type pos = out.rfind(name); + // If the output matches exactly + if (pos != out.npos && + pos == out.size() - name.size() && + (pos ==0 || out[pos-1] == '/')) { return *i; } |