[cfe-dev] cmake hack: make headers available in IDE/qtcreator

Georg Altmann george at george-net.de
Thu Jan 29 05:13:30 PST 2015


Hi,

this is a quick hack I figure could be helpful to others to make llvm
and clang headers visible to qt creator. Just add the following to
CMakeLists.txt of clang:

# Generate a list of LLVM and Clang headers.
file(GLOB_RECURSE ALL_CLANG_HEADERS include/*.h)
file(GLOB_RECURSE ALL_LLVM_HEADERS  ../../include/*.h)
set(ALL_HEADERS "${ALL_CLANG_HEADERS}" "${ALL_LLVM_HEADERS}")

# Add a custom dummy target that uses all headers as source.
add_custom_target(header_dummy_target SOURCES "${ALL_HEADERS}")

Now qt creator  should find the headers when using locator. Might be
useful for other IDEs as well (Eclipse CDT ?).

Regards,
Georg




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150129/c12d8033/attachment.sig>


More information about the cfe-dev mailing list