cisco / openh264

Open Source H.264 Codec
BSD 2-Clause "Simplified" License
5.58k stars 1.8k forks source link

Require C++14 when tests are enabled #3807

Open barracuda156 opened 1 week ago

barracuda156 commented 1 week ago

gtest requires C++14:

  FAILED: test/api/test_api.p/BaseDecoderTest.cpp.o 
  /usr/bin/clang++ -Itest/api/test_api.p -Itest/api -I../openh264-2.5.0/test/api -Icodec/api/wels -I../openh264-2.5.0/codec/api/wels -I../openh264-2.5.0/codec/common/inc -Itest -I../openh264-2.5.0/test -I/opt/local/include -fdiagnostics-color=always -Wall -Winvalid-pch -O2 -g -Wno-non-virtual-dtor -Werror -Wunused-but-set-variable -Wno-strict-aliasing -DHAVE_AVX2 -pipe -Os -stdlib=libc++ -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -arch x86_64 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk -Wno-dangling-else -MD -MQ test/api/test_api.p/BaseDecoderTest.cpp.o -MF test/api/test_api.p/BaseDecoderTest.cpp.o.d -o test/api/test_api.p/BaseDecoderTest.cpp.o -c ../openh264-2.5.0/test/api/BaseDecoderTest.cpp
  In file included from ../openh264-2.5.0/test/api/BaseDecoderTest.cpp:2:
  In file included from /opt/local/include/gtest/gtest.h:63:
  In file included from /opt/local/include/gtest/gtest-assertion-result.h:46:
  In file included from /opt/local/include/gtest/gtest-message.h:57:
  /opt/local/include/gtest/internal/gtest-port.h:279:2: error: C++ versions less than C++14 are not supported.
  #error C++ versions less than C++14 are not supported.
   ^
  /opt/local/include/gtest/internal/gtest-port.h:955:12: error: no member named 'make_tuple' in namespace 'std'
  using std::make_tuple;
        ~~~~~^
  /opt/local/include/gtest/internal/gtest-port.h:956:12: error: no member named 'tuple' in namespace 'std'
  using std::tuple;
        ~~~~~^
  /opt/local/include/gtest/internal/gtest-port.h:966:27: error: deleted function definitions are a C++11 extension [-Werror,-Wc++11-extensions]
    Secret(const Secret&) = delete;
                            ^
  /opt/local/include/gtest/internal/gtest-
aeiouaeiouaeiouaeiouaeiouaeiou commented 1 week ago

I would say C++17, since it actually requires [maybe_unused].

barracuda156 commented 1 week ago

@aeiouaeiouaeiouaeiouaeiouaeiou As of now, it works with -std=c++14, AFAICT.

aeiouaeiouaeiouaeiouaeiouaeiou commented 6 days ago

3809