Skip to content
master
Go to file
Code

Latest commit

Lukasz Czerwinski
Lukasz Czerwinski readme update
dd53ab1

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Copyright (C) 2012 Łukasz Czerwiński

PCHGenerator

PCHGenerator is a tool to help generate precompiled header. It scans all source files in a project, selects the most frequently used headers and puts them into the precompiled header.

Website

https://github.com/wo3kie/pchGenerator

Requirements

python >2.7

How to use it?

  1. Run pch.py to generate precompiled.h file
    $ pch.py -c="-I/usr/lib/boost" main.cpp test.cpp
    
    $ cat precompiled.h
    // File generated by  : pch.py
    // Compilation options: -I/usr/lib/boost
    // Project path       : /home/project*
    // Threshold          : 1
    // Exclude pattern    :
    // Exclude but pattern:
    #include "/ ... /include/c++/3.4.5/iostream"
    #include "/ ... /include/c++/3.4.5/vector"
    
  2. Compile precompiled.h into precompiled.gch
    $ g++ -I d:\boost precompiled.h
    
  3. Compile your project using prcompiled.gch according to the g++ manual. For details check here gnu g++ or here stackoverflow.

Todo

Maybe some day in the future I will do

  • add some support for CLang
  • add some support for Microsoft Visual C++

About

Select the most often used headers in project and put them into precompiled header

Resources

License

Packages

No packages published

Languages