>From what I understand the only time this really became a problem was when there were multiple instances of MAIN_DEPENENCY across multiple targets. If done within a single target CMake did the right thing and only attached the first build rule.
The issue really seems to be related to multiple targets, not multiple custom_commands within a single target. I'm fine with this policy as long as it captures the actual problem and doesn't break what already seemed to work just fine. The problem is the current detection only barfs (unless I missed something - please correct if I'm wrong). What we need is detection and adaptation. Rather than telling the user, "DON'T DO THAT!" we should be helping the user out by saying, "I know you wanted this to be attached as a MAIN_DEPENDENCY, but that doesn't work, so I'm going to help you out and disable this feature for this file." Then I can specify MAIN_DEPENDENCY and not worry about the collisions that cause problems. On Mon, Apr 27, 2015 at 7:39 AM Nils Gladitz <nilsglad...@gmail.com> wrote: > On 04/27/2015 03:31 PM, Brad King wrote: > > The policy was added to diagnose some previously-broken cases earlier. > > We technically never supported duplicate MAIN_DEPENDENCY specification > > but did not diagnose it. Instead it could produce bad builds in some > > cases IIRC. > > > > Nils, do you remember where this came up? > > I think I covered this in: > http://www.cmake.org/Bug/view.php?id=15525#c38598 > > Issues I know of (two of which I reported; including the above) are: > http://www.cmake.org/Bug/view.php?id=14550 > http://www.cmake.org/Bug/view.php?id=15434 > http://www.cmake.org/Bug/view.php?id=15525 > > Nils >
-- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers