Skip to content

Commit

Permalink
fix(tests): Prefer __version__ over MSVC
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Mar 20, 2024
1 parent 8e4348a commit 6daeb9c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/pybind11_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ PYBIND11_MODULE(pybind11_tests, m) {

// Intentionally kept minimal to not create a maintenance chore
// ("just enough" to be conclusive).
#if defined(_MSC_FULL_VER)
m.attr("compiler_info") = "MSVC " PYBIND11_TOSTRING(_MSC_FULL_VER);
#elif defined(__VERSION__)
#if defined(__VERSION__)
m.attr("compiler_info") = __VERSION__;
#elif defined(_MSC_FULL_VER)
m.attr("compiler_info") = "MSVC " PYBIND11_TOSTRING(_MSC_FULL_VER);
#else
m.attr("compiler_info") = py::none();
#endif
Expand Down

0 comments on commit 6daeb9c

Please sign in to comment.