On Thursday 14 March 2013, Stephen Kelly wrote: > Brad King wrote: > > On 03/14/2013 01:43 PM, Alexander Neundorf wrote: > >> Would you object a check that if a target has at least one C or Fortran > >> source file, but no C++ source file, it should skipped for automoc ? > > > > I was thinking about that approach too. Basically if the target > > has at least one C++ source or *no sources from any language* > > then we should honor AUTOMOC. > > That idea has the same problem that it works in current releases: > > diff --git a/Tests/QtAutomoc/CMakeLists.txt > b/Tests/QtAutomoc/CMakeLists.txt index ebfbb03..1ac6f3b 100644 > --- a/Tests/QtAutomoc/CMakeLists.txt > +++ b/Tests/QtAutomoc/CMakeLists.txt > @@ -44,3 +44,7 @@ set_target_properties(empty PROPERTIES AUTOMOC TRUE) > target_link_libraries(empty no_link_language) > add_library(no_link_language STATIC empty.h) > set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE) > + > +add_library(empty_c STATIC empty.c) > +set_target_properties(empty_c PROPERTIES AUTOMOC TRUE) > +target_link_libraries(empty_c no_link_language)
yes, and I think it's a bug (caused by me). If I was a cmake user and not a developer, I would file a bug report if I would find out that my helloworld.c suddenly links again libstdc++.so Alex -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
