From 97862b126a82017203394908a166687d474f5127 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 18 Feb 2022 11:51:56 -0800 Subject: [PATCH] Using `#undef _` before "#include ", as suggested by @henryiii (#3747) --- .github/workflows/ci.yml | 2 +- .github/workflows/ci_sh_def.yml | 2 +- tests/pure_cpp/smart_holder_poc_test.cpp | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ff6e1eab..1540d87ec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,7 +45,7 @@ jobs: python: '3.6' args: > -DPYBIND11_FINDPYTHON=ON -# BREAKS -DCMAKE_CXX_FLAGS="-D_=1" + -DCMAKE_CXX_FLAGS="-D_=1" - runs-on: windows-latest python: '3.6' args: > diff --git a/.github/workflows/ci_sh_def.yml b/.github/workflows/ci_sh_def.yml index f9c3d6594..aa01aa035 100644 --- a/.github/workflows/ci_sh_def.yml +++ b/.github/workflows/ci_sh_def.yml @@ -57,7 +57,7 @@ jobs: python: '3.6' args: > -DPYBIND11_FINDPYTHON=ON -# BREAKS -DCMAKE_CXX_FLAGS="-D_=1" + -DCMAKE_CXX_FLAGS="-D_=1" - runs-on: windows-latest python: '3.6' args: > diff --git a/tests/pure_cpp/smart_holder_poc_test.cpp b/tests/pure_cpp/smart_holder_poc_test.cpp index e414930a8..cbdbc25f2 100644 --- a/tests/pure_cpp/smart_holder_poc_test.cpp +++ b/tests/pure_cpp/smart_holder_poc_test.cpp @@ -1,5 +1,10 @@ #include "pybind11/detail/smart_holder_poc.h" +// Catch uses _ internally, which breaks gettext style defines +#ifdef _ +# undef _ +#endif + #define CATCH_CONFIG_MAIN #include "catch.hpp"