summaryrefslogtreecommitdiff
path: root/docs/manual.adoc
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-22 00:14:48 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2015-03-22 00:14:48 -0700
commitd4f9047b2fdd47ee36e9f5138c5aafbca2c22d3f (patch)
tree74d8c1f912e7c2515c7cd4c984a00f9a47856f34 /docs/manual.adoc
parent11054219de052e4fef039c9328304a3d546be99e (diff)
docs: Fix PUGIXML_HEADER_ONLY description
Users no longer need to #include "pugixml.cpp"
Diffstat (limited to 'docs/manual.adoc')
-rw-r--r--docs/manual.adoc16
1 files changed, 2 insertions, 14 deletions
diff --git a/docs/manual.adoc b/docs/manual.adoc
index 1b9fdaa..9b55a44 100644
--- a/docs/manual.adoc
+++ b/docs/manual.adoc
@@ -203,27 +203,15 @@ It's possible to use pugixml in header-only mode. This means that all source cod
Note that there are advantages and drawbacks of this approach. Header mode may improve tree traversal/modification performance (because many simple functions will be inlined), if your compiler toolchain does not support link-time optimization, or if you have it turned off (with link-time optimization the performance should be similar to non-header mode). However, since compiler now has to compile pugixml source once for each translation unit that includes it, compilation times may increase noticeably. If you want to use pugixml in header mode but do not need XPath support, you can consider disabling it by using <<PUGIXML_NO_XPATH,PUGIXML_NO_XPATH>> define to improve compilation time.
-Enabling header-only mode is a two-step process:
-
-* You have to define `PUGIXML_HEADER_ONLY`
-* You have to include `pugixml.cpp` whenever you include pugixml.hpp
-
-Both of these are best done via `pugiconfig.hpp` like this:
-
-[source]
-----
-#define PUGIXML_HEADER_ONLY
-#include "pugixml.cpp"
-----
+To enable header-only mode, you have to define `PUGIXML_HEADER_ONLY`. You can either do it in `pugiconfig.hpp`, or provide them via compiler command-line.
Note that it is safe to compile `pugixml.cpp` if `PUGIXML_HEADER_ONLY` is defined - so if you want to i.e. use header-only mode only in Release configuration, you
-can include pugixml.cpp in your project (see <<install.building.embed>>), and conditionally enable header-only mode in `pugiconfig.hpp`, i.e.:
+can include pugixml.cpp in your project (see <<install.building.embed>>), and conditionally enable header-only mode in `pugiconfig.hpp` like this:
[source]
----
#ifndef _DEBUG
#define PUGIXML_HEADER_ONLY
- #include "pugixml.cpp"
#endif
----