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) Thanks, Steve. -- 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
