Browse Source

Fixes #28, also updated README.md for out of source test build

merge-requests/37/head
eidheim 9 years ago
parent
commit
e9ae076c63
  1. 2
      CMakeLists.txt
  2. 14
      README.md

2
CMakeLists.txt

@ -11,7 +11,7 @@ endif()
add_subdirectory(src) add_subdirectory(src)
if(libclangmm_BUILD_TESTS) if(LIBCLANGMM_BUILD_TESTS)
enable_testing() enable_testing()
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()

14
README.md

@ -16,17 +16,13 @@ See [installation guide](https://github.com/cppit/libclangmm/blob/master/docs/in
# Tests # # Tests #
To run the unit tests, first enable the CMake option `LIBCLANGMM_BUILD_TESTS`: To run the unit tests, first enable the CMake option `LIBCLANGMM_BUILD_TESTS`:
```sh ```sh
cmake -DLIBCLANGMM_BUILD_TESTS=ON . mkdir build && cd build
cmake -DLIBCLANGMM_BUILD_TESTS=ON ..
``` ```
Then, simply call: Then, run the tests:
```sh ```sh
make make
ctest cd ../tests
``` ../build/tests/clangmm_tests --log_level=all
You may also run the test binary directly to get more details:
```sh
make
cd 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). 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).

Loading…
Cancel
Save