summaryrefslogtreecommitdiffstats
path: root/Tests/Module/GenerateExportHeader/exportheader_test.cpp
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-09-30 13:27:49 (GMT)
committerBrad King <brad.king@kitware.com>2013-09-30 19:03:00 (GMT)
commitdccd4949c05dbabbbdbeb67be2e8d618157099d5 (patch)
treea02686b87e6781cc2140e090dcd6584aacd99394 /Tests/Module/GenerateExportHeader/exportheader_test.cpp
parent2268c41a057d948ad6773c5145ee5bf6d19ea3bf (diff)
downloadCMake-dccd4949c05dbabbbdbeb67be2e8d618157099d5.zip
CMake-dccd4949c05dbabbbdbeb67be2e8d618157099d5.tar.gz
CMake-dccd4949c05dbabbbdbeb67be2e8d618157099d5.tar.bz2
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.
Diffstat (limited to 'Tests/Module/GenerateExportHeader/exportheader_test.cpp')
0 files changed, 0 insertions, 0 deletions