On Saturday, 18 November 2006 13:59, Chris Cannam wrote:
> Since we don't currently have an
> INSTALL file at all, how about creating one that just has a one-line
> summary of what the most likely WANT_ options etc mean, something about
> debug/release, install target selection, verbose output and so on?

OK. Done (please review).

> One other thing -- can we support the use of a precompiled header for
> gcc 4.x users, consisting of the Qt and KDE includes?  I still haven't
> completely switched from gcc 3.x to 4.x myself so I'm not very familiar
> with how, or how well, these work, but my understanding is gcc 4.x
> users should be able to save a bit of build time that way.

I've committed preliminary support for PCH. Reference info:
http://gcc.gnu.org/onlinedocs/gcc/Precompiled-Headers.html

There are two new scripts in cmake_admin. Both scripts search for the includes 
from Qt and KDE in the sources, using find, grep and friends and then...
QTKDEPCHjoin.cmake creates and compiles a single PCH including all Qt and KDE 
headers used in the project.
QTKDEPCHsplit.cmake compiles each Qt and KDE header used in the project.
This last method takes a lot of time to precompile all the headers used, and 
needs more that 2Gb of disk space! Unless I've done something wrong, it can 
be discarded. Both scripts provide a macro ADD_QTKDE_PRECOMPILED_HEADERS() 
and a custom target named "precompiled_headers", so they should be  
interchangeable (see the top of src/CMakeLists.txt). There is a new WANT_PCH 
option (disabled by default, for now) that can be enabled for gcc v4.x

There is a problem (a WTF, I would say) when using PCH. The compilation of  
"gui/widgets/ProgressDialog.cpp" fails because this class access a 
"mShowTimer" member from KProgressDialog which is declared as private. To do 
so, somebody played with the preprocessor in ProgressDialog.h doing this 
dirty hack:

#define private protected // fugly
#include <kprogress.h>
#undef private

Of course, this doesn't work with the PCH automatically generated, because 
kprogress.h is not processed in ProgressDialog.h anymore. Please, can 
somebody clean this issue?

Here is a report comparing build times. It shows intersting time savings. 
Using gcc 4.0.1 on Mandriva 2006.0, processor AMD Athlon XP 2800

Build Type     | Flags   | without PCH | with PCH  | Savings
---------------+---------+-------------+-----------+--------
Debug          | -O0 -g3 |    15:55    |   11:17   |  28 %
Release        | -O2     |    17:50    |   12:28   |  30 %
RelWithDebInfo | -O2 -g  |    21:38    |   17:08   |  20 %

(Elapsed times in minutes:seconds)

Debug build with PCH is the fastest, but you are warned that it takes 689 Mb 
of disk space. The PCH itself is about 42 Mb.

> And finally, now that it's actually rebuilt while I was typing, I notice
> that "make install" always installs all the data files, regardless of
> whether they're already installed or not 

The documentation says that it only installs the files that have changed. This 
may be a bug. See CMAKE_INSTALL_ALWAYS on this page:
http://www.cmake.org/Wiki/CMake_Useful_Variables

Regards,
Pedro


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to