diff options
| author | Dominic Hamon <dominichamon@users.noreply.github.com> | 2020-08-21 16:25:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-21 16:25:56 +0100 |
| commit | 5c25ad3acb24802943935783aadd5e035e6edbf0 (patch) | |
| tree | ef95088a71df46992b72ce0cb2545fae99b69f8e | |
| parent | bb978c06d0fc326c8e87cf6ef4fbbb44ab1704db (diff) | |
| download | platform_external_google-benchmark-5c25ad3acb24802943935783aadd5e035e6edbf0.tar.gz platform_external_google-benchmark-5c25ad3acb24802943935783aadd5e035e6edbf0.tar.bz2 platform_external_google-benchmark-5c25ad3acb24802943935783aadd5e035e6edbf0.zip | |
Ctest support (#1025)
* ctest is now working
* Update README
* remove commented out lines
* Tweaked docs
Added note to use parallel and cleaned build config notes
* Response to comments
* revert all but the readme
* make error message clearer
* drop --parallel
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | cmake/GoogleTest.cmake.in | 2 |
2 files changed, 3 insertions, 4 deletions
@@ -76,7 +76,7 @@ $ cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../ # or, starting with CMake 3.13, use a simpler form: # cmake -DCMAKE_BUILD_TYPE=Release -S . -B "build" # Build the library. -$ cmake --build "build" --config Release --parallel +$ cmake --build "build" --config Release ``` This builds the `benchmark` and `benchmark_main` libraries and tests. On a unix system, the build directory should now look something like this: @@ -94,7 +94,7 @@ On a unix system, the build directory should now look something like this: Next, you can run the tests to check the build. ```bash -$ cmake --build "build" --config Release --target test +$ cmake -E chdir "build" ctest --build-config Release ``` If you want to install the library globally, also run: @@ -132,7 +132,6 @@ cache variables, if autodetection fails. If you are using clang, you may need to set `LLVMAR_EXECUTABLE`, `LLVMNM_EXECUTABLE` and `LLVMRANLIB_EXECUTABLE` cmake cache variables. - ### Stable and Experimental Library Versions The main branch contains the latest stable version of the benchmarking library; diff --git a/cmake/GoogleTest.cmake.in b/cmake/GoogleTest.cmake.in index 28818ee..fd957ff 100644 --- a/cmake/GoogleTest.cmake.in +++ b/cmake/GoogleTest.cmake.in @@ -31,7 +31,7 @@ if(EXISTS "${GOOGLETEST_PATH}" AND IS_DIRECTORY "${GOOGLETEST_PATH}" ) else() if(NOT ALLOW_DOWNLOADING_GOOGLETEST) - message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable ALLOW_DOWNLOADING_GOOGLETEST, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") + message(SEND_ERROR "Did not find Google Test sources! Either pass correct path in GOOGLETEST_PATH, or enable BENCHMARK_DOWNLOAD_DEPENDENCIES, or disable BENCHMARK_ENABLE_GTEST_TESTS / BENCHMARK_ENABLE_TESTING.") else() message(WARNING "Did not find Google Test sources! Fetching from web...") ExternalProject_Add( |
