diff options
author | Brian Homerding <homerdin@gmail.com> | 2018-06-06 14:06:46 +0000 |
---|---|---|
committer | Brian Homerding <homerdin@gmail.com> | 2018-06-06 14:06:46 +0000 |
commit | e03362dd823aee47ae4418e8e71355f5fc4b5b52 (patch) | |
tree | ab26c5446969547c3f8990038a27ded4db16ddf8 /MicroBenchmarks | |
parent | 29d859599c70dd1090a406cc360fb752747ead5e (diff) |
[test-suite] Enable MicroBenchmarks by default and enable benchmark library to cross compile.
With the changes in https://reviews.llvm.org/rL327422 and
https://reviews.llvm.org/rL327710 the MicroBenchmarks directory produces
additional meaningful data. The patch enables the MicroBenchmarks directory
to build by default and forces the benchmark library to build with C++11 and
use std::regex to circumvent cmake try_run tests that are limited when cross
compiling.
Reviewers: MatzeB, hfinkel
Differential Revision: https://reviews.llvm.org/D46267
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@334097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'MicroBenchmarks')
-rw-r--r-- | MicroBenchmarks/CMakeLists.txt | 10 | ||||
-rw-r--r-- | MicroBenchmarks/libs/CMakeLists.txt | 7 |
2 files changed, 13 insertions, 4 deletions
diff --git a/MicroBenchmarks/CMakeLists.txt b/MicroBenchmarks/CMakeLists.txt index ed67e9d0..0c117a10 100644 --- a/MicroBenchmarks/CMakeLists.txt +++ b/MicroBenchmarks/CMakeLists.txt @@ -1,5 +1,7 @@ -file(COPY lit.local.cfg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) +if(NOT DEFINED DISABLE_CXX) + file(COPY lit.local.cfg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}) -add_subdirectory(libs) -add_subdirectory(XRay) -add_subdirectory(LCALS) + add_subdirectory(libs) + add_subdirectory(XRay) + add_subdirectory(LCALS) +endif() diff --git a/MicroBenchmarks/libs/CMakeLists.txt b/MicroBenchmarks/libs/CMakeLists.txt index a75b9e34..255e7b27 100644 --- a/MicroBenchmarks/libs/CMakeLists.txt +++ b/MicroBenchmarks/libs/CMakeLists.txt @@ -1,3 +1,10 @@ +# The benchmark library build system uses try_run tests to determine regex +# Circumvent these tests and enforce std::regex +set(CMAKE_CXX_STANDARD 11) +set(HAVE_STD_REGEX 1) +# When enforcing c++11 we need to disable one of the benchmark library's tests +set(BENCHMARK_HAS_CXX03_FLAG 0) + add_subdirectory(benchmark-1.3.0) test_suite_add_build_dependencies(benchmark) test_suite_add_build_dependencies(output_test_helper) |