From b3e3934347f284e6358c64db8a1acdfe8785b9c7 Mon Sep 17 00:00:00 2001 From: Sterling Augustine Date: Fri, 4 Oct 2019 22:15:28 +0000 Subject: [PATCH] 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 llvm-svn: 373796 --- libcxx/CMakeLists.txt | 1 + libcxx/test/CMakeLists.txt | 16 ++++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index d1a0658..335e7bc 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -81,6 +81,7 @@ option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ lib ${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) diff --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt index e6ef628..8147451 100644 --- a/libcxx/test/CMakeLists.txt +++ b/libcxx/test/CMakeLists.txt @@ -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) -- 2.7.4