
"Daniel Pfeifer" <daniel@pfeifer-mail.de> wrote in message news:1296457482.2147.7.camel@daniel-desktop...
Until CMake gets proper precompiled headers support you can easily add support for Xcode (Mac OS X) with:
set( CMAKE_XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "<path to header>" CACHE STRING "" FORCE )
set( CMAKE_XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES" CACHE STRING "" FORCE )
Thank you for the input! I hope it works like this too:
set_target_properties(<targets> PROPERTIES XCODE_ATTRIBUTE_GCC_PREFIX_HEADER "<path to header>" XCODE_ATTRIBUTE_GCC_PRECOMPILE_PREFIX_HEADER "YES" )
Otherwise it would mean that all targets have to use the same PCH.
Hi, sorry for the delay... I would expect it to work this way too but cannot confirm as I haven't tried it...
Is the header then included automatically in all source files or do you still have to include it manually?
It is included automatically... -- "What Huxley teaches is that in the age of advanced technology, spiritual devastation is more likely to come from an enemy with a smiling face than from one whose countenance exudes suspicion and hate." Neil Postman