diff options
author | Eric Fiselier <eric@efcs.ca> | 2018-11-14 20:38:46 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2018-11-14 20:38:46 +0000 |
commit | 336a1a681189bf2b50b7bd0f8229656c58ac1b37 (patch) | |
tree | af32e54c51b309a92f94bea5e4f6da0090748e1e /libcxx/CMakeLists.txt | |
parent | 7f15568c400024222cc9507c78c5a76aa12f37bf (diff) | |
download | bcm5719-llvm-336a1a681189bf2b50b7bd0f8229656c58ac1b37.tar.gz bcm5719-llvm-336a1a681189bf2b50b7bd0f8229656c58ac1b37.zip |
Rename cxx-benchmark-unittests target and convert to LIT.
This patch renames the cxx-benchmark-unittests to check-cxx-benchmarks
and converts the target to use LIT in order to make the tests run faster
and provide better output.
In particular this runs each benchmark in a suite one by one, allowing
more parallelism while ensuring output isn't garbage with multiple threads.
Additionally, it adds the CMake flag '-DLIBCXX_BENCHMARK_TEST_ARGS=<list>'
to specify what options are passed when running the benchmarks.
llvm-svn: 346888
Diffstat (limited to 'libcxx/CMakeLists.txt')
-rw-r--r-- | libcxx/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 88bf4961fe8..d090860e417 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -83,6 +83,11 @@ option(LIBCXX_INCLUDE_TESTS "Build the libc++ tests." ${LLVM_INCLUDE_TESTS}) # Benchmark options ----------------------------------------------------------- option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependencies" ON) + +set(LIBCXX_BENCHMARK_TEST_ARGS_DEFAULT --benchmark_min_time=0.01) +set(LIBCXX_BENCHMARK_TEST_ARGS "${LIBCXX_BENCHMARK_TEST_ARGS_DEFAULT}" CACHE STRING + "Arguments to pass when running the benchmarks using check-cxx-benchmarks") + set(LIBCXX_BENCHMARK_NATIVE_STDLIB "" CACHE STRING "Build the benchmarks against the specified native STL. The value must be one of libc++/libstdc++") @@ -766,6 +771,18 @@ include_directories(include) add_subdirectory(include) add_subdirectory(lib) +set(LIBCXX_TEST_DEPS "") + +if (LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY) + list(APPEND LIBCXX_TEST_DEPS cxx_experimental) +endif() +if (LIBCXX_ENABLE_FILESYSTEM) + list(APPEND LIBCXX_TEST_DEPS cxx_filesystem) +endif() + +if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY) + list(APPEND LIBCXX_TEST_DEPS cxx_external_threads) +endif() if (LIBCXX_INCLUDE_BENCHMARKS) add_subdirectory(benchmarks) |