-
Notifications
You must be signed in to change notification settings - Fork 50
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
Building tests fails with gtest 1.14.0: error C++ versions less than C++14 are not supported #44
Comments
I have the same problem with building with gtest in Ubuntu Thanks in advance. |
Please check whether #46 resolves your issues. |
This didn't work for me. I've been setting all the cmake flags I can for 4 hours and am starting to think it's an issue with gtest itself. For context, I'm trying to compile and install ROS 1 from source on Ubuntu 24.04 since I can't install it through a package manager, as it's only available for 20.04. But I'm also getting this error outside opencv and am wondering the same thing. Will keep y'all posted on what I figure out. |
Did it show this error:
or something else? For example I had issue ( ade/sources/tests/CMakeLists.txt Lines 16 to 23 in 0e8a2cc
-Wno-error=maybe-uninitialized ).
|
Yup, exactly that's the error I got (the first one with the C++ 14). Not sure if it's related to this issue, but I found a hack in one of the steps I totally forgot about in this installation guide https://gist.github.com/Meltwin/fe2c15a5d7e6a8795911907f627255e0 I'm following which was to run this python script in the root of my cmake folders: https://gist.github.com/Meltwin/1ee35296d2bb86fee19d639580e3c91f. I think it does something similar to your suggestion, but as I said it's more of a hack or brute force fix where it scans all of the folders and edits the cmake files. Not the ideal thing, but at least now my compiler isn't complaining which is good. |
Although I think since this is only concerning opencv, your PR should fix it as long as the edit is at the top level of the cmake lists. In my case, I had a bunch of CMake files which were somehow overriding the c++ flags even though I specified them not to be overridden. |
Builds for ade (
version 0.1.2d
) are currently failing for openSUSE Tumbleweed when building tests using system installed gtest which is atversion 1.14.0
. This version of gtest requires at least whereas ade seems to enforceCMAKE_CXX_STANDARD=11
and passing-DCMAKE_CXX_STANDARD=14
when calling cmake does not help either.Here is the relevant portion of the failing build log:
Would be grateful for any suggestion about working around this. We could patch the ade CMakeLists.txt file to change the standard to 14, of course, but do not know whether that would be advisable.
Some additional info:
Thanks in advance.
The text was updated successfully, but these errors were encountered: