Compilation failing due to gtest
- Dominant language
- C++
- Stars
- 32.1k
- Forks
- 6.9k
- Avg merge
- 32m
- Merged PRs (30d)
- 1
Description
The gtest present in `third-party/` is failing to compile because it picks headers (`gtest.h` from another version of gtest installed in my system. The latest gtest have deprecated `TearDownTestCaseFunc` method. Now it has new name - `TearDownTestSuiteFunc`.
### Expected behavior
`-Ithird-party/gtest-1.8` should be the first include_dir while compiling `gtest-all.cc` , so that compiler doesn't pick system headers or the headers from other toolchain (for eg: `$Snappy_INCLUDE_DIRS` ).
### Actual behavior
Compilation should not fail. The gtest present in `third-party/` is failing to compile
### Steps to reproduce the behavior
```
cd $SOURCE_DIR
cmake -DWITH_SNAPPY=1 -DSnappy_LIBRARIES=$TOOLCHAIN_LOCAL/lib/libsnappy.a \
-DSnappy_INCLUDE_DIRS=$TOOLCHAIN_LOCAL/include ..
```
### Error :
```
/Users/mohit.saini/projects/toolchain_builder/build/rocksdb-6.11.4-source/third-party/gtest-1.8.1/fused-src/gtest/gtest-all.cc:4215:20: error: no type named
'TearDownTestCaseFunc' in 'testing::Test'; did you mean 'internal::TearDownTestSuiteFunc'?
Test::TearDownTestCaseFunc tear_down_tc)
^~~~~~~~~~~~~~~~~~~~~~~~~~
internal::TearDownTestSuiteFunc
/usr/local/scaligent/toolchain/local/include/gtest/internal/gtest-internal.h:478:7: note: 'internal::TearDownTestSuiteFunc' declared here
using TearDownTestSuiteFunc = void (*)();
^
```
Contributor guide
Assessment
This issue has not been assessed yet.