From 85f9e92c18283d42737ebd067df4f881824e4edb Mon Sep 17 00:00:00 2001 From: Dmitry Arkhipov Date: Mon, 23 Sep 2024 08:52:25 +0300 Subject: [PATCH] pretty printer cleanup --- CMakeLists.txt | 1 + build/Jamfile | 1 + include/boost/json/detail/gdb_printers.hpp | 2 +- pretty_printers/FindBoostPrettyPrinters.cmake | 4 +++- 4 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5d159c96..da991910e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,6 +59,7 @@ if(BoostPrettyPrinters_FOUND) INPUT src/boost_json_gdb_printers.py OUTPUT include/boost/json/detail/gdb_printers.hpp HEADER_GUARD BOOST_JSON_DETAIL_GDB_PRINTERS_HPP + NO_DISABLE_MACRO EXCLUDE_FROM_ALL) endif() diff --git a/build/Jamfile b/build/Jamfile index 23bd03799..65af97800 100644 --- a/build/Jamfile +++ b/build/Jamfile @@ -89,6 +89,7 @@ boost-pretty-printers.gdb-python-header gdb_printers.hpp : boost_json_gdb_printers.py : ../include/boost/json/detail --header-guard=BOOST_JSON_DETAIL_GDB_PRINTERS_HPP + --disable-macro= ; always gdb_printers.hpp ; explicit regenerate-printers gdb_printers.hpp ; diff --git a/include/boost/json/detail/gdb_printers.hpp b/include/boost/json/detail/gdb_printers.hpp index 0fbe80e2f..ccc7f1ebd 100644 --- a/include/boost/json/detail/gdb_printers.hpp +++ b/include/boost/json/detail/gdb_printers.hpp @@ -7,7 +7,7 @@ // Official repository: https://github.com/boostorg/json // -// Autogenerated from boost_json_gdb_printers.py by boost-gdb +// Autogenerated from boost_json_gdb_printers.py by boost-pretty-printers #ifndef BOOST_JSON_DETAIL_GDB_PRINTERS_HPP #define BOOST_JSON_DETAIL_GDB_PRINTERS_HPP diff --git a/pretty_printers/FindBoostPrettyPrinters.cmake b/pretty_printers/FindBoostPrettyPrinters.cmake index b14f515af..e25678918 100644 --- a/pretty_printers/FindBoostPrettyPrinters.cmake +++ b/pretty_printers/FindBoostPrettyPrinters.cmake @@ -23,7 +23,7 @@ set(BoostPrettyPrinters_GDB_TEST_SCRIPT set(BoostPrettyPrinters_INCLUDES "${CMAKE_CURRENT_LIST_DIR}/include") function(boost_pretty_printers_gdb_python_header) - set(options EXCLUDE_FROM_ALL) + set(options NO_DISABLE_MACRO EXCLUDE_FROM_ALL) set(oneValueArgs TARGET INPUT OUTPUT HEADER_GUARD DISABLE_MACRO) set(multiValueArgs) cmake_parse_arguments(BOOST_PPRINT_GDB_GEN @@ -42,6 +42,8 @@ function(boost_pretty_printers_gdb_python_header) if(DEFINED BOOST_PPRINT_GDB_GEN_DISABLE_MACRO) set(BOOST_PPRINT_GDB_GEN_DISABLE_MACRO "--disable-macro=${BOOST_PPRINT_GDB_GEN_DISABLE_MACRO}") + elseif(BOOST_PPRINT_GDB_GEN_NO_DISABLE_MACRO) + set(BOOST_PPRINT_GDB_GEN_DISABLE_MACRO "--disable-macro=") endif() add_custom_command( OUTPUT "${BOOST_PPRINT_GDB_GEN_OUTPUT}"