aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Homerding <homerdin@gmail.com>2018-05-24 13:45:20 +0000
committerBrian Homerding <homerdin@gmail.com>2018-05-24 13:45:20 +0000
commitc71e88be514f1ac5c259a7c9e2690921337c7a3a (patch)
tree26674cf45e182b5da479f51345b7fac1bc15b100
parent590caeb4bf414318f7dc2ee41cb211397c40061c (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@333184 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--CMakeLists.txt3
-rw-r--r--MicroBenchmarks/CMakeLists.txt10
-rw-r--r--MicroBenchmarks/libs/CMakeLists.txt2
3 files changed, 9 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9b5e8364..43899d54 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -212,8 +212,7 @@ if(NOT TEST_SUITE_SUBDIRS)
foreach(entry ${sub_cmakelists})
get_filename_component(subdir ${entry} DIRECTORY)
# Exclude tools and CTMark from default list
- if(NOT ${subdir} STREQUAL tools AND NOT ${subdir} STREQUAL CTMark
- AND NOT ${subdir} STREQUAL MicroBenchmarks)
+ if(NOT ${subdir} STREQUAL tools AND NOT ${subdir} STREQUAL CTMark)
list(APPEND TEST_SUITE_SUBDIRS ${subdir})
endif()
endforeach()
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..91622d9c 100644
--- a/MicroBenchmarks/libs/CMakeLists.txt
+++ b/MicroBenchmarks/libs/CMakeLists.txt
@@ -1,3 +1,5 @@
+set(CMAKE_CXX_STANDARD 11)
+set(HAVE_STD_REGEX 1)
add_subdirectory(benchmark-1.3.0)
test_suite_add_build_dependencies(benchmark)
test_suite_add_build_dependencies(output_test_helper)