[cmake-developers] Automoc in cmake

Brad King brad.king at kitware.com
Tue Sep 20 08:34:08 EDT 2011


On 9/20/2011 1:26 AM, Alexander Neundorf wrote:
> set(CMAKE_INCLUDE_CURRENT_DIR ON) automatically adds the current source dir
> and the current binary dir for each directory which has a target as include
> directory.
>
> This is a bit more than necessary for automoc.
> For automoc for every target which needs moc'ing its current binary dir has to
> be added.

I'd rather keep CMAKE_AUTOMOC and CMAKE_INCLUDE_CURRENT_DIR separate.
When we add per-target include directories then we can document the
AUTOMOC property to automatically add the target's binary directory
to its include path.  Until then it's not too bad to ask projects to
set both options.

-Brad



More information about the cmake-developers mailing list