> Any luck? I can try helping ya trace it if you need it.
>
I traced this down to some degree.
The problem arises from the handling of file path for GENERATED vs non
GENERATED files.
When the full path for a file is computed in cmSourceFile and the file doesn't
exist (mocs_compilation.cpp doesn't, yet), a path error flag is set.
The flag won't be raised when the file has the property GENERATED set, which
mocs_compilation.cpp hasn't at that point.
A quick solution in your CMakeLists.txt is to mark mocs_compilation.cpp
GENERATED first like this
```
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY GENERATED "1")
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY COMPILE_FLAGS
" /FI\"${PrecompiledHeader}\"")
```
This works here for a small example project.
I'm too busy right now to address this in the CMake sources but I'll try to
look at it next week.
-Sebastian
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers