I have directory aaa and aaa/bb. I want CMake to create the moc_compilation.o file only for aaa/*.cxx files, but it scans recursively aaa/bb/*.cxx files also. How can I disable the recursive scan for automoc?
Asked
Active
Viewed 598 times
1 Answers
0
You can use the SKIP_AUTOMOC source file property to skip automoc processing for one file, or an entire group of files. This works for header files as well:
file(GLOB MY_EXCLUDED_SOURCES aaa/bb/*.cxx)
set_property(SOURCE ${MY_EXCLUDED_SOURCES} PROPERTY SKIP_AUTOMOC ON)
Kevin
- 16,549
- 8
- 60
- 74