Skip to content

Commit 09d641f

Browse files
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 git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@373796 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 2f59751 commit 09d641f

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ lib
8181
${ENABLE_FILESYSTEM_DEFAULT})
8282
option(LIBCXX_INCLUDE_TESTS "Build the libc++ tests." ${LLVM_INCLUDE_TESTS})
8383
option(LIBCXX_ENABLE_PARALLEL_ALGORITHMS "Enable the parallel algorithms library. This requires the PSTL to be available." OFF)
84+
option(LIBCXX_TEST_GDB_PRETTY_PRINTERS "Test gdb pretty printers." OFF)
8485

8586
# Benchmark options -----------------------------------------------------------
8687
option(LIBCXX_INCLUDE_BENCHMARKS "Build the libc++ benchmarks and their dependencies" ON)

test/CMakeLists.txt

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,16 @@ if (NOT DEFINED LIBCXX_TEST_DEPS)
6060
message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined")
6161
endif()
6262

63-
find_program(LIBCXX_GDB gdb)
64-
if (LIBCXX_GDB)
65-
set(LIBCXX_GDB "${LIBCXX_GDB}")
66-
message(STATUS "gdb found: ${LIBCXX_GDB}")
67-
else()
68-
message(STATUS "gdb not found. Disabling dependent tests.")
63+
# Turn this on by default when the pretty printers are python3
64+
# compatible.
65+
if(LIBCXX_TEST_GDB_PRETTY_PRINTERS)
66+
find_program(LIBCXX_GDB gdb)
67+
if (LIBCXX_GDB)
68+
set(LIBCXX_GDB "${LIBCXX_GDB}")
69+
message(STATUS "gdb found: ${LIBCXX_GDB}")
70+
else()
71+
message(STATUS "gdb not found. Disabling dependent tests.")
72+
endif()
6973
endif()
7074

7175
if (LIBCXX_INCLUDE_TESTS)

0 commit comments

Comments
 (0)