On Sun, Jan 20, 2019 at 2:37 PM Charlie Turner <chtu...@gmail.com> wrote:

> On Sun, 20 Jan 2019, 10:39 Orgad Shaneh <org...@gmail.com wrote:
>
>> On Fri, Jan 18, 2019 at 5:03 PM Charlie Turner <chtu...@gmail.com> wrote:
>>
>>> On Fri, 18 Jan 2019 at 12:54, Orgad Shaneh <org...@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
_______________________________________________
Qt-creator mailing list
Qt-creator@qt-project.org
https://lists.qt-project.org/listinfo/qt-creator

Reply via email to