On 03/26/2015 05:16 PM, felix schwitzer wrote: > Is this a bug in UseSWIG or is my use case invalid?
It's a bug exposed by the policy warning. We never supported repeated use of MAIN_DEPENDENCY, it just wasn't diagnosed before CMP0057. > The warning comes from UseSWIG in line 193; the interface file is added as > a MAIN_DEPENDENCY to the swig-generated wrapper file, and because of the loop, > it is added twice, to the lttPYTHON_warp.cxx and lttRUBY_warp.cxx, > the two swig-generated files. > > Fixing this would be simple by adding the interface file as a normal > dependency > to the wrapper-files, the only drawback is backward compatibility. Yes, it should be fixed to just use DEPENDS instead of MAIN_DEPENDENCY, at least if there are multiple languages to be generated. There is no compatibility issue because MAIN_DEPENDENCY only affects the presentation of source files in IDE projects. Otherwise it is the same as DEPENDS. This is likely why repeated MAIN_DEPENDENCY didn't get noticed before. I'm not set up to test UseSWIG on a real project like you. Would you please look at making and testing the change locally and then send a patch? Thanks, -Brad -- 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
