Question

How do you specify precompiled headers for xcode with gyp, specifically xcode 4.6 with clang.

I only see visual studio options.

'msvs_precompiled_header': 'stdio.h',
'msvs_precompiled_source': 'precomp.c',
Was it helpful?

Solution

Gyp is pretty nice but the documentation is awful.

The answer in case anyone runs across the need for it is:

'xcode_settings': {
  'GCC_PREFIX_HEADER': 'path/from/gyp/file/to/header.h',
  'GCC_PRECOMPILE_PREFIX_HEADER': 'YES',
},

Also worth noting you can set pretty much everything in this page in a xcode_settings block

Xcode Build Settings Reference

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top