[Qt-creator] How to unconditionally include code into the indexer?
Orgad Shaneh
orgads at gmail.com
Sun Jan 20 14:40:23 CET 2019
On Sun, Jan 20, 2019 at 2:37 PM Charlie Turner <chturne at gmail.com> wrote:
> On Sun, 20 Jan 2019, 10:39 Orgad Shaneh <orgads at gmail.com wrote:
>
>> On Fri, Jan 18, 2019 at 5:03 PM Charlie Turner <chturne at gmail.com> wrote:
>>
>>> On Fri, 18 Jan 2019 at 12:54, Orgad Shaneh <orgads at gmail.com> wrote:
>>>
>>> > Set it as a precompiled header. I'm not sure how this is done with
>>> cmake, I did it with qmake and qbs.
>>>
>>> I guess there's no equivalent to the project.config file you can use
>>> when importing projects from existing sources?
>>>
>>
>> You can add #include "config.h" in project.config.
>>
>
> Is the config file honoured when using cmake projects? It doesn't seem to
> be generated like it is when importing project from existing sources.
>
You asked about project.config, which is used in GenericProjectManager.
CMake doesn't seem to have any built-in way to declare precompiled headers.
But if you can convince the code model to have "-include config.h", this
should work (at least with master qtc):
string(APPEND CMAKE_CXX_FLAGS " -include ${PROJECT_SOURCE_DIR}/foo.h")
- Orgad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20190120/618e3885/attachment.html>
More information about the Qt-creator
mailing list