Brad King dccd4949c0 Use first custom command for the same output (#14446)
In buggy code like

 add_custom_command(
   OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/out.h
   MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/out.h.in
   ...)
 add_custom_command(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/out.h
   ...)

that has more than one rule to generate the same output CMake has always
used the first rule.  However, since commit 2268c41a (Optimize custom
command full-path dependency lookup, 2013-08-06) we update the map from
output to cmSourceFile for every rule generating an output, effectively
keeping the last command instead of the first.

Fix this regression by checking for each map update if the output
already has an entry.  If so, keep only the original entry.  The VS 8
generator triggers this with a special case for generate.stamp rules
that differ between ZERO_CHECK and normal targets, so do not warn for
now.  Leave a TODO comment for warning in the future.
2013-09-30 15:03:00 -04:00
..
2013-07-22 09:48:32 -04:00
2013-05-16 14:38:07 -04:00
2013-07-16 13:59:30 -04:00
2013-07-31 08:48:19 -04:00
2013-08-06 00:01:05 -04:00
2013-05-22 12:52:12 -04:00
2013-05-16 19:33:13 +02:00
2011-09-15 16:20:33 +02:00
2012-09-28 17:00:52 -04:00
2012-09-28 17:00:52 -04:00
2012-02-02 23:40:21 +00:00
2013-07-31 08:48:19 -04:00
2012-02-21 15:33:31 -05:00