[Regression] AUTOMOC is broken on Windows if AUTOUIC is not enabled
When trying to build a project on Windows using AUTOMOC without AUTOUIC with CMake 3.8.1, moc is not invoked and moc_compilation.cpp is not generated. I tried MSYS Makefiles, Unix Makefiles and MSVC 14 generators, but all had the same result.
This is a regression from 3.7, in which the build worked fine. Also tested in 3.8.1 on macOS and 3.8.0 on Linux, where it builds fine as well.
Minimal repro is attached. Adding
set(CMAKE_AUTOUIC ON) before creating the target fixes the build, but should not be necessary.