From e9ae076c635794add1cc5d675008631583475848 Mon Sep 17 00:00:00 2001 From: eidheim Date: Fri, 30 Dec 2016 12:33:10 +0100 Subject: [PATCH] Fixes #28, also updated README.md for out of source test build --- CMakeLists.txt | 2 +- README.md | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50182af..d7de0ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ endif() add_subdirectory(src) -if(libclangmm_BUILD_TESTS) +if(LIBCLANGMM_BUILD_TESTS) enable_testing() add_subdirectory(tests) endif() diff --git a/README.md b/README.md index 7f3b2d4..8ac14d1 100644 --- a/README.md +++ b/README.md @@ -16,17 +16,13 @@ See [installation guide](https://github.com/cppit/libclangmm/blob/master/docs/in # Tests # To run the unit tests, first enable the CMake option `LIBCLANGMM_BUILD_TESTS`: ```sh -cmake -DLIBCLANGMM_BUILD_TESTS=ON . +mkdir build && cd build +cmake -DLIBCLANGMM_BUILD_TESTS=ON .. ``` -Then, simply call: +Then, run the tests: ```sh make -ctest -``` -You may also run the test binary directly to get more details: -```sh -make -cd tests -./clangmm_tests --log_level=all +cd ../tests +../build/tests/clangmm_tests --log_level=all ``` For more options, see the [documentation of boost’s unit testing framework](http://www.boost.org/doc/libs/1_58_0/libs/test/doc/html/utf/user-guide/runtime-config/reference.html).