Precompiled header with CMake

Forum for posting problems using QxOrm library

Precompiled header with CMake

Postby talnicolas » Fri Apr 13, 2012 7:34 pm

The project in which we are using QxOrm doesn't have any .pro file. It is using CMake generating a VS10 project.
Would be possible to have an example that shows how to use correctly precompiled.h using CMake?
(until now I was just adding the include in the header files, I want now to use it the correct way)

Thanks.
talnicolas
 
Posts: 3
Joined: Tue Feb 21, 2012 7:37 pm

Re: Precompiled header with CMake

Postby QxOrm admin » Sat Apr 14, 2012 10:15 am

Hi,

It is using CMake generating a VS10 project.
Would be possible to have an example that shows how to use correctly precompiled.h using CMake?

I don't know CMake at all, so I can't help you for CMake, sorry.
MSVC2008, MSVC2010 and GCC supports precompiled headers, so there is no reason that CMake doesn't support it !
You should try to find a CMake FAQ or other resources about CMake on the web...

until now I was just adding the include in the header files

It's a very bad thing !!!
Using precompiled header or not, your source code doesn't have to change (without precompiled header support, compilation time will increase, but this is the same source code).
To use precompiled header correctly, it is very simple :
* doesn't include a precompiled header into an include file (never) ;
* into each *.cpp files, the first include must be the precompiled header file.
QxOrm admin
 


Return to QxOrm - Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron