summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2019-07-24 13:18:17 +0200
committerJoel Rosdahl <joel@rosdahl.net>2019-08-14 21:41:28 +0200
commit68e42bd71650d003cb8f01d6572020015ecc2e58 (patch)
tree00f1cc30a983379696a8318c488aab2b50360fc6 /doc
parentfc49e169b480c43dbe9598a64bb89b6743c3bc7e (diff)
downloadccache-68e42bd71650d003cb8f01d6572020015ecc2e58.tar.gz
C++-ify source code
The ccache source code will be converted to C++, targeting C++11. This commit only arranges the existing C-style code to be built as C++ code. This makes it possible to call new C++ code from old C-style code. Gradual conversion to C++ functionality and idioms will follow in a slow and controlled fashion – no big bang rewrites. The alternative would be to convert code in a top-down fashion, i.e. only calling legacy C code from new C++ code, not the other way around. That approach is however not a good idea since the code that will benefit most from being written in proper C++ is code deep down in the call chains. Except for renaming source code files to .cpp and .hpp, this commit makes minimal changes to make the code base buildable again, for example: - Instructs configure.ac to look for a mandatory C++11-compliant compiler. - Adds Makefile rules for building C++ code. - Sets up Travis-CI to pass C++ compiler flags and similar to the build. - Adds new casts where needed. - Adds const keywords where needed. - Renames variables to something else than C++ keywords (e.g. “template”). - Rearranges some code to avoid complaints about goto jumps that cross variable lifetimes.
Diffstat (limited to 'doc')
-rw-r--r--doc/INSTALL-from-release-archive.md3
-rw-r--r--doc/INSTALL.md3
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/INSTALL-from-release-archive.md b/doc/INSTALL-from-release-archive.md
index d758377f..0a54b384 100644
--- a/doc/INSTALL-from-release-archive.md
+++ b/doc/INSTALL-from-release-archive.md
@@ -7,7 +7,8 @@ Prerequisites
To build ccache from a
[release archive](https://ccache.dev/download.html), you need:
-- A C compiler (for instance GCC).
+- A C++11 compiler.
+- A C89 compiler.
- [libb2](https://github.com/BLAKE2/libb2). If you don't have libb2 installed
and can't or don't want to install it on your system, you can pass
`--with-libb2-from-internet` to the configure script, which will make the
diff --git a/doc/INSTALL.md b/doc/INSTALL.md
index c12f7b98..76c874dc 100644
--- a/doc/INSTALL.md
+++ b/doc/INSTALL.md
@@ -6,7 +6,8 @@ Prerequisites
To build ccache from a source repository, you need:
-- A C compiler (for instance GCC)
+- A C++11 compiler.
+- A C89 compiler.
- GNU Bourne Again SHell (bash) for tests.
- [AsciiDoc](https://www.methods.co.nz/asciidoc/) to build the HTML
documentation.