Include current source directory

When including the project from a parent directory (add_subdirectory), backward.hpp is not found by the tests because we include CMAKE_SOURCE_DIR, which is the parent's source directory. Include CMAKE_CURRENT_SOURCE_DIR instead.
Merge pull request #14 from hesiod/patch-1

Include current source directory
Add option to disable test compilation
Remove unneeded include directive

There is no "include" directory in backward-cpp and hence no need to include it.
Improve CMake build system, allow easy integration

Make backward easier to use for CMake users, enabling easy feature detection and integration.

We now detect presence of libdw, libbfd and libunwind directly in the script. The macro add_backward adds needed libraries, definitions and the include directory to a target. The pseudo-library enable_backward enables automatic backward processing for common failures to a target.

If BACKWARD_ENABLE_ONLY_IN_DEBUG is set to true, automatic backward processing is only added when the build type is Debug or RelWithDebInfo.

To integrate backward in an existing CMake project:
add_subdirectory(/path/to/backward-cpp)
add_executable(mytarget example.cpp ${backward_ENABLE})
add_backward(mytarget)

BACKWARD_DEFINITIONS has been renamed to backward_DEFINITIONS to have a naming convention for public variables similiar to the find modules.
Fix compilation warning under clang

Clang complains about adding const to a reference type having no effect.
Fix this by adding and using a const_ref_t.
Require CMake 2.8.8

Object libraries were introduced in CMake 2.8.8.

Signed-off-by: Tobias Markus <tobias@markus-regensburg.de>
Merge pull request #16 from hesiod/build-system

Build system
Merge pull request #15 from hesiod/fix-clang-warning

Fix compilation warning under clang
Remove BACKWARD_ENABLE_ONLY_IN_DEBUG

Doesn't work (yet) because CMake lacks generator expressions when listing source files.
Merge pull request #18 from hesiod/patch-2

Remove BACKWARD_ENABLE_ONLY_IN_DEBUG
Fix typo

Should be backward_DEFINITIONS instead of BACKWARD_DEFINITIONS.
Merge pull request #19 from hesiod/patch-3

Fix typo
Describe CMake integration
Remove unneeded CMake command

Definitions are already included with add_backward.
Fix message type

Whoops, there is no INFO message type. Make it a WARNING instead.
Make feature detection values internal

Previously, the "feature detection options" (STACK_DETAILS_* and STACK_WALKING_*) had to be manually set by an user, but now, we (attempt) to detect libraries based on find_library, thus we don't need those to be cache values anymore. Libraries in non-default paths can be manually added in the corresponding _PATH cache value and for testing purposes, users can also disable libraries by supplying an empty string.
Fix CMake style

I erred concerning CMake variable naming conventions.
Mark most cache values as advanced

To avoid confusion, hide some configuration value from the normal user.
Revert 0660344

Turns out I was wrong, we do need that command.