summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md31
-rw-r--r--src/CMakeLists.txt8
2 files changed, 31 insertions, 8 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 25dea39e..bb27c0a8 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,9 +1,9 @@
Tips for contributors
---------------------
-* Please **make pull requests against `next`, not `master`**.
- Ledger follows a [git-flow] branching model,
- in which development happens on the `next` branch and is subsequently merged into `master` for releases.
+* Please **make pull requests against `next`, not `master`**. Ledger follows
+ a [git-flow] branching model, in which development happens on the `next`
+ branch and is subsequently merged into `master` for releases.
* If you're making **changes to files for which the Travis build is not
relevant**, please **add `[ci skip]` to the end of the commit message**.
@@ -91,6 +91,31 @@ orientation:
**./tools/**: an accretion of tools, mostly small scripts, to aid development
+Building
+---
+
+If you are going to be working on Ledger, you'll want to enable both debug
+builds (which are the default, using `acprep`), and also the use of
+pre-compiled headers. To do this, specify your compiler as either `clang++`
+or `g++` as follows:
+
+ mkdir build
+ ./acprep --compiler=clang++
+ cd build
+ make
+
+This will set up a debug build using clang++ (and pre-compiled headers, which
+is enabled by the combination of those two), and then start a build.
+
+For even quicker rebuilds, try the Ninja build tool, which is very fast at
+determining what to rebuild, and automatically takes advantage of multiple
+cores:
+
+ mkdir build
+ ./acprep --compiler=clang++ --ninja
+ cd build
+ ninja
+
[Boost]: http://boost.org
[Boost.Python]: http://www.boost.org/libs/python/
[GMP]: http://gmplib.org/
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6d35aff3..71d9478a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -138,9 +138,7 @@ set(LEDGER_INCLUDES
${PROJECT_BINARY_DIR}/system.hh)
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
- if ((CMAKE_CXX_COMPILER MATCHES "clang") OR
- (CMAKE_CXX_COMPILER MATCHES "clang\\+\\+") OR
- (CMAKE_CXX_COMPILER MATCHES "cxx"))
+ if (CMAKE_CXX_COMPILER MATCHES "clang\\+\\+")
add_definitions(
# -Weverything
# -Wno-disabled-macro-expansion
@@ -155,6 +153,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
# -Wno-c++98-compat
# -fno-limit-debug-info
-Wno-\#pragma-messages
+ -Wno-unused-local-typedef
--system-header-prefix=include/boost/
--system-header-prefix=boost/)
@@ -194,8 +193,7 @@ if (CMAKE_BUILD_TYPE STREQUAL "Debug")
DEPENDS ${_header_filename})
endmacro(ADD_PCH_RULE _header_filename _src_list _other_srcs)
- elseif ((CMAKE_CXX_COMPILER MATCHES "g\\+\\+") OR
- (CMAKE_CXX_COMPILER MATCHES "c\\+\\+"))
+ elseif (CMAKE_CXX_COMPILER MATCHES "g\\+\\+")
set(GXX_WARNING_FLAGS
-pedantic
-Wall