diff options
author | Brad King <brad.king@kitware.com> | 2013-10-01 12:05:17 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-10-01 12:05:17 (GMT) |
commit | e02e56c4a6bbf4d98662d8faee27342b41f78e14 (patch) | |
tree | 3fcc1e2db63dc044a5d8c668e7dad9befeb7618f | |
parent | fa97f43c81eac8379317a22d6d668984d2349fb0 (diff) | |
parent | dccd4949c05dbabbbdbeb67be2e8d618157099d5 (diff) | |
download | CMake-e02e56c4a6bbf4d98662d8faee27342b41f78e14.zip CMake-e02e56c4a6bbf4d98662d8faee27342b41f78e14.tar.gz CMake-e02e56c4a6bbf4d98662d8faee27342b41f78e14.tar.bz2 |
Merge topic 'fix-duplicate-custom-commands'
dccd494 Use first custom command for the same output (#14446)
-rw-r--r-- | Source/cmMakefile.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index fd06a33..34541e9 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -1069,6 +1069,19 @@ void cmMakefile::UpdateOutputToSourceMap(std::string const& output, cmSourceFile* source) { + OutputToSourceMap::iterator i = this->OutputToSource.find(output); + if(i != this->OutputToSource.end()) + { + // Multiple custom commands produce the same output but may + // be attached to a different source file (MAIN_DEPENDENCY). + // LinearGetSourceFileWithOutput would return the first one, + // so keep the mapping for the first one. + // + // TODO: Warn the user about this case. However, the VS 8 generator + // triggers it for separate generate.stamp rules in ZERO_CHECK and + // individual targets. + return; + } this->OutputToSource[output] = source; } |