Skip to content

Commit

Permalink
Downgrade googletest to an older version (pytorch#475)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#475

As title. For the previous google test version, it can pass the OSS unit tests in the PR (e.g., pytorch#473, check the green check symbol), but failed the CircleCI unit tests when committing to the trunk:
https://app.circleci.com/pipelines/github/pytorch/FBGEMM/95/workflows/f13cd5ce-8787-4564-a96d-2d7b2597b67f/jobs/476

```
/root/project/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h: At global scope:
/root/project/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h:1239:21: error: variadic templates only available with -std=c++11 or -std=gnu++11 [-Werror]
 template <size_t... Idx, typename... T>
                     ^
/root/project/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h:1239:34: error: variadic templates only available with -std=c++11 or -std=gnu++11 [-Werror]
 template <size_t... Idx, typename... T>
```

Maybe due to c++11 support?

Checking the current CMakeLists.txt in google test, it doesn't specify c++11 support.

This Diff reverts to an older version of google test commit (still newer than the old Sept 2018 version of google test) which includes "GTEST_SKIP" supports:

```
set(GOOGLETEST_VERSION 1.10.0)

if (CMAKE_VERSION VERSION_LESS "3.1")
  add_definitions(-std=c++11)
else()
  set(CMAKE_CXX_STANDARD 11)
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
  if(NOT CYGWIN)
    set(CMAKE_CXX_EXTENSIONS OFF)
  endif()
endif()
```

Reviewed By: jspark1105

Differential Revision: D25801335

fbshipit-source-id: dcc49177af35d877c90f1c76ed0f61acd31e0f6c
  • Loading branch information
jianyuh authored and facebook-github-bot committed Jan 6, 2021
1 parent 8bec3f7 commit 260cc6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion third_party/googletest
Submodule googletest updated 137 files

0 comments on commit 260cc6e

Please sign in to comment.