-
Notifications
You must be signed in to change notification settings - Fork 905
[build] Update for compatibility with CMake 4.x #3167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thank you for raising this. Just bumped into this issue after updating OSX and cmake to 4.x . I'm using a node js wrapper https://github.com/Eyevinn/node-srt that utilizes this library and was wondering why the srt library kept on failing to compile. |
MacOS build seems to be failing due to incompatible version of C++. Might need a version bump to 17 (-DUSE_CXX_STD=17) or downgrade of googletest. |
This C++17 is a requiremet from Google Test. I don't know what happened, but CI builds should use Google Test with the version that is defined in this cmake build. |
Also following test seems to be failing: not sure if it's flakyness or has there been some breaking changes ? [ RUN ] ReuseAddr.Wildcard |
It looks like the brew formula https://formulae.brew.sh/api/formula/googletest.json installs google test version 1.17.0 and the 1.17.x version seems to have compile target for c++ 17 https://github.com/google/googletest/blob/52eb8108c5bdec04579160ae17225d66034bd723/googletest/cmake/internal_utils.cmake#L198 where as 1.16.x had for c++ 14 https://github.com/google/googletest/blob/6910c9d9165801d8827d628cb72eb7ea9dd538c5/googletest/cmake/internal_utils.cmake#L198 . Update: Aha, it's there on the first page https://github.com/google/googletest?tab=readme-ov-file#release-1170 . "Release 1.17.0 is now available. The 1.17.x branch [requires at least C++17]((https://opensource.google/documentation/policies/cplusplus-support#c_language_standard)." |
Might need to add something along the lines of:
to the github workfile to roll back older version of google test.. Something like this #3170 |
The best approach is if GTest is not installed in the system, but downloaded by the build script in the version as specified there. Not sure what happened, but some properties of the side software used have been likely changed behind our back. Some fixes are already prepared also for the non-working CI, but it was not intended to be added to 1.5.5 release. |
Note also that some of the tests have a tendency to have random fails; this results mainly from things happening depending on some slight time differences. Fixes for these problems are underway, but they will be added only to 1.6.0. |
As of CMake 4.0, backward compatibility with versions of CMake older than 3.5 is removed.
This change is inspired/informed by similar changes in other projects: