Hello Venedict,

I took a look at this again, thanks for the additional information.
In fact this isn't VS specific. I was able to reproduce the issue using
Linux/Makefiles.

> Got the fix, hopefully it can be merged in :)
> https://github.com/Personwithhat/custom_cmake/commit/d7930c36c6aa7956a806a28
> 4aa7e1e430ef6c174

This change is too intrusive and breaks a lot of other things.

> >>> set (MOC_COMPILATION
> >>> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.c
> >>> pp") # stdafx.h needs to be included to ensure platform definitions are
> >>> visible
> >>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
> >>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")

Setting compiler flags on the mocs_compilation.cpp file is the root cause.
I'll investigate this deeper.

-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

Reply via email to