[libcxx-commits] [libcxx] r373796 - Add an off-by-default option to enable testing for gdb pretty printers.

Sterling Augustine via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 4 15:15:28 PDT 2019


Author: saugustine
Date: Fri Oct  4 15:15:28 2019
New Revision: 373796

URL: http://llvm.org/viewvc/llvm-project?rev=373796&view=rev
Log:
Add an off-by-default option to enable testing for gdb pretty printers.

Summary:
The current version of the pretty printers are not python3 compatible,
so turn them off by default until sufficiently improved.

Reviewers: MaskRay, tamur

Subscribers: mgorny, christof, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68477

Modified:
    libcxx/trunk/CMakeLists.txt
    libcxx/trunk/test/CMakeLists.txt

Modified: libcxx/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/CMakeLists.txt?rev=373796&r1=373795&r2=373796&view=diff
==============================================================================
--- libcxx/trunk/CMakeLists.txt (original)
+++ libcxx/trunk/CMakeLists.txt Fri Oct  4 15:15:28 2019
@@ -81,6 +81,7 @@ option(LIBCXX_ENABLE_FILESYSTEM "Build f
     ${ENABLE_FILESYSTEM_DEFAULT})
 option(LIBCXX_INCLUDE_TESTS "Build the libc++ tests." ${LLVM_INCLUDE_TESTS})
 option(LIBCXX_ENABLE_PARALLEL_ALGORITHMS "Enable the parallel algorithms library. This requires the PSTL to be available." OFF)
+option(LIBCXX_TEST_GDB_PRETTY_PRINTERS "Test gdb pretty printers." OFF)
 
 # Benchmark options -----------------------------------------------------------
 option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependencies" ON)

Modified: libcxx/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/CMakeLists.txt?rev=373796&r1=373795&r2=373796&view=diff
==============================================================================
--- libcxx/trunk/test/CMakeLists.txt (original)
+++ libcxx/trunk/test/CMakeLists.txt Fri Oct  4 15:15:28 2019
@@ -60,12 +60,16 @@ if (NOT DEFINED LIBCXX_TEST_DEPS)
   message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined")
 endif()
 
-find_program(LIBCXX_GDB gdb)
-if (LIBCXX_GDB)
-  set(LIBCXX_GDB "${LIBCXX_GDB}")
-  message(STATUS "gdb found: ${LIBCXX_GDB}")
-else()
-  message(STATUS "gdb not found. Disabling dependent tests.")
+# Turn this on by default when the pretty printers are python3
+# compatible.
+if(LIBCXX_TEST_GDB_PRETTY_PRINTERS)
+  find_program(LIBCXX_GDB gdb)
+  if (LIBCXX_GDB)
+    set(LIBCXX_GDB "${LIBCXX_GDB}")
+    message(STATUS "gdb found: ${LIBCXX_GDB}")
+  else()
+    message(STATUS "gdb not found. Disabling dependent tests.")
+  endif()
 endif()
 
 if (LIBCXX_INCLUDE_TESTS)




More information about the libcxx-commits mailing list