[PATCH] D46267: [test-suite] Enable MicroBenchmarks by default

Brian Homerding via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 14:25:53 PDT 2018


homerdin updated this revision to Diff 148101.
homerdin added reviewers: dberris, eizan.
homerdin added a comment.

I've added some definitions to the MicroBenchmarks/libs/CMakeLists.txt.  Keeping these out of the benchmark library CMakeLists.txt will prevent having to make custom changes whenever the benchmark library is upgraded.  I am not currently setup to test this while cross compiling.  The `try_run`'s should still compile but fail to build, but with the `HAVE_STD_REGEX` this will not be a fatal error.

Adding dberris and Eizan as reviewers.


https://reviews.llvm.org/D46267

Files:
  CMakeLists.txt
  MicroBenchmarks/CMakeLists.txt
  MicroBenchmarks/libs/CMakeLists.txt


Index: MicroBenchmarks/libs/CMakeLists.txt
===================================================================
--- MicroBenchmarks/libs/CMakeLists.txt
+++ 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)
Index: MicroBenchmarks/CMakeLists.txt
===================================================================
--- MicroBenchmarks/CMakeLists.txt
+++ 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()
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -212,8 +212,7 @@
   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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46267.148101.patch
Type: text/x-patch
Size: 1472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180522/43e3cb79/attachment.bin>


More information about the llvm-commits mailing list