Skip to content

Require C++17 when building w/ gtest support #11

Merged
d-torrance merged 2 commits intoMacaulay2:masterfrom
d-torrance:c++17
Feb 3, 2026
Merged

Require C++17 when building w/ gtest support #11
d-torrance merged 2 commits intoMacaulay2:masterfrom
d-torrance:c++17

Conversation

@d-torrance
Copy link
Member

This is required by googletest since 0.17.0. When using older compilers, ./configure will fail, not because it can't find gtest, but because it runs into this:

configure:4586: checking for gtest/gtest.h
configure:4586: /opt/spack/opt/spack/linux-zen/compiler-wrapper-1.0-5ek7f4quicgccbu7qgixwxvwugqo6b6i/libexec/spack/gcc/g++ -c -g -O2  conftest.cpp >&5
In file included from /opt/spack/opt/spack/linux-zen/googletest-1.17.0-tvc36uogphcgyc6sandua5bz4y4k4rqm/include/gtest/gtest-message.h:57,
                 from /opt/spack/opt/spack/linux-zen/googletest-1.17.0-tvc36uogphcgyc6sandua5bz4y4k4rqm/include/gtest/gtest-assertion-result.h:46,
                 from /opt/spack/opt/spack/linux-zen/googletest-1.17.0-tvc36uogphcgyc6sandua5bz4y4k4rqm/include/gtest/gtest.h:63,
                 from conftest.cpp:47:
/opt/spack/opt/spack/linux-zen/googletest-1.17.0-tvc36uogphcgyc6sandua5bz4y4k4rqm/include/gtest/internal/gtest-port.h:273:2: error: #error C++ versions less than C++17 are not supported.
 #error C++ versions less than C++17 are not supported.
  ^~~~~

@d-torrance d-torrance merged commit 8661e97 into Macaulay2:master Feb 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant