ericniebler/range-v3 — pull request #19 by gnzlbg (2014-07-15 11:39:11+00:00)
Title: travis-ci integration

**Travis-CI** support (results for the branch are [here](https://travis-ci.org/gnzlbg/range-v3/builds/29970297)).

Travis-ci is a continuous integration framework that;
- builds the test in debug, release, and with asan using both gcc and clang,
- runs the tests for all commits, pull-requests, etc and shows the results next to them on github.

Its main limitation is that it is Linux only, and right now it supports gcc 4.8, and clang 3.4.
More tools can be integrated (easily: valgrind, clang-format, clang static-analyzer, UBSan, harder: MSan).

**Note to Eric**: you need to activate travis-ci by logging into its website with your github account. IIRC you might also need to choose there which of your repos it should scan (it might do it automatically).

**Updated CMake File**:
- added Release and Debug builds (we can discuss the flags here), and
- factored out the path of libcxx (more about this below).

Since libcxx is only officially supported on Mac, CMake has no "find_libcxx" script, and even using it on Mac can be a pain, the easiest is to manually provide the `include` and `lib` (this works for linux, mac, and windows, as well as for those with multiple libcxx versions). I recommend using a script to avoid writing:

```bash
cmake . -DCMAKE_BUILD_TYPE="Release/Debug" \
-DLIBCXX_INCLUDE_DIR="path-to-libcxx/include" \
-DLIBCXX_LIB_DIR="path-to-libcxx/lib"
```

This one works on Mac and Linux:

```bash
#!/bin/bash
export LIBCXX_DIRS="-DLIBCXX_INCLUDE_DIR=\"path-to-libcxx/include\" -DLIBCXX_LIB_DIR=\"path-to-libcxx/lib\" "

while getopts "drhx" option
do
case "${option}" in
h)
echo "Following build modes are available:"
echo "-d Debug"
echo "-r Release"
exit 1
;;
d)
eval "cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Debug"
echo "Debug configuration finished!"
exit 1
;;
r)
eval "cmake $CMAKE_FLAGS -DCMAKE_BUILD_TYPE=Release"
echo "Release configuration finished!"
exit 1
;;
esac
done
```