diff --git a/CMakeLists.txt b/CMakeLists.txt index d8be2213..85a1e5a3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,7 @@ ENDIF () IF (MSGPACK_BUILD_TESTS) ENABLE_TESTING () + list(APPEND CMAKE_CTEST_ARGUMENTS "--output-on-failure") # MEMORYCHECK_COMMAND_OPTIONS needs to place prior to CTEST_MEMORYCHECK_COMMAND SET (MEMORYCHECK_COMMAND_OPTIONS "--leak-check=full --show-leak-kinds=definite,possible --error-exitcode=1") FIND_PROGRAM(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) diff --git a/README.md b/README.md index c5a7b575..471dc87b 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,13 @@ How to build: $ make $ sudo make install +How to run tests: + +In order to run tests you must have the [GoogleTest](https://github.com/google/googletest) framework installed. If you do not currently have it, install it and re-run `cmake`. +Then: + + $ make test + When you use the C part of `msgpack-c`, you need to build and link the library. By default, both static/shared libraries are built. If you want to build only static library, set `BUILD_SHARED_LIBS=OFF` to cmake. If you want to build only shared library, set `BUILD_SHARED_LIBS=ON`. #### GUI on Windows