Difference between revisions of "Cpp Coding Standards/HEADERS/IncPCH"

From Apache OpenOffice Wiki
Jump to: navigation, search
(moved from summary page to details)
 
 
Line 8: Line 8:
 
  #include "Foo.hxx"
 
  #include "Foo.hxx"
 
  #include "Bar.hxx"
 
  #include "Bar.hxx"
 +
[[Category:Coding Standards]]

Latest revision as of 17:13, 14 December 2009

Precompiled Headers (IncPCH)

  • The first statement in each cxx files should be the inclusion of precompiled headers. There must be no other includes, no definitions and no include guards around the include statement. Forget this for a new file and you break the build.
  • Assume the precompiled header file is empty and include all your headers normally.
#include "precompiled_foo.hxx" // May or may not contain includes for Foo.hxx and Bar.hxx

#include "Foo.hxx"
#include "Bar.hxx"
Personal tools