lukaszczerwinski
c++ programmer
Designed by Lukasz Czerwinski
• Copyright © 2009 by Lukasz Czerwinski   •   All Rights reserved   •
PCHGenerator

Support for precompiled headers for g++ (&msvc, &clang)
HOME
ABOUT ME
PROJECTS
C++
GALLERY
HOME
ABOUT ME
PROJECTS
C++
GALLERY
Pablo Software Solutions
Shortcuts

github/wo3kie/pchGenerator

pchGenerator.cpp
News...

1 May 2012
PCHGenerator 1.0.0 released!


PCHGenerator...

The PCHGenerator is a tool for helping precompiled header generation. It scans all source files in project and selects the most often used headers for putting them into precompiled header.


License...

PCHGenerator tool is developed under the BSD license. It is allowed to distribute source, use it and modify without any limitations either for personal or commercial goal. Whilst distributing source code using PCHGenerator it is obligate to mark the author

There is absolutely no guarantee that PCHGenerator tool will work without any errors and that is free of any bugs. PCHGenerator author is not responsible for any damages, mind and financial loses related with PCHGenerator using.


How to use it...

1) Create precompiled.h file
pch.py -c YourCurrentCompilationOption YourSourceFiles

  lukasz@KOMPUTEREK ~/pchGenerator (master)
  $ pch.py -c="-I d:\boost" main.cpp test.cpp

  $ cat precompiled.h
  // File generated by  : pch.py
  // Compilation options: -I C:\boost
  // Project path       : /home/project*
  // Threshold          : 1
  // Exclude pattern    :
  // Exclude but pattern:
  #include "d:/MinGW/bin/../ ... /include/c++/3.4.5/iostream"
  #include "d:/MinGW/bin/../ ... /include/c++/3.4.5/vector"



2) Compile precompiled.h into precompiled.gch
g++ YourCurrentCompilationOption precompiled.h

 
$ g++ -I d:\boost precompiled.h

3) Compile your project with prcompiled.gch according to the g++ manual
In every source code at the beginning put '#include "precompiled.h"' line.
For details click here (gnu g++) or here (stackoverflow).


Requirements...

PCHGenerator depends on following externals:
python


Bugs...

There are no bugs. There are "features".


Support and further development...

Maybe some day in the future I will do
- add some support for CLang
- add some support for Microsoft Visual C++


GitHub...

https://github.com/wo3kie/pchGenerator


Download...

pchGenerator.cpp (unfortunately disabled since corporate bureaucracy)
pchGenerator.zip (source code in Python from gitHub)
Polish