Skip to content

Commit

Permalink
Use c++17 for OSS gtest (pytorch#3654)
Browse files Browse the repository at this point in the history
Summary:
Some test code uses c++17 feature (inline static member)

Pull Request resolved: pytorch#3654

Test Plan: CI. `sh test/run_oss_cpp_tests.sh`

Reviewed By: shoumikhin

Differential Revision: D57477500

Pulled By: kirklandsign

fbshipit-source-id: b0fef3340240dcd775910cab673f6a50c9ee7088
  • Loading branch information
kirklandsign authored and facebook-github-bot committed May 17, 2024
1 parent 4008600 commit ae311b4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions extension/data_loader/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 3.19)
project(extension_data_loader_test)

# Use C++14 for test.
set(CMAKE_CXX_STANDARD 14)
# Use C++17 for test.
set(CMAKE_CXX_STANDARD 17)

set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..)

Expand Down
4 changes: 2 additions & 2 deletions runtime/core/exec_aten/testing_util/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 3.19)
project(runtime_core_exec_aten_testing_util_test)

# Use C++14 for test.
set(CMAKE_CXX_STANDARD 14)
# Use C++17 for test.
set(CMAKE_CXX_STANDARD 17)

set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../../..)

Expand Down
4 changes: 2 additions & 2 deletions runtime/core/exec_aten/util/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 3.19)
project(runtime_core_exec_aten_util_test)

# Use C++14 for test.
set(CMAKE_CXX_STANDARD 14)
# Use C++17 for test.
set(CMAKE_CXX_STANDARD 17)

set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../../..)

Expand Down
4 changes: 2 additions & 2 deletions runtime/core/portable_type/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 3.19)
project(runtime_core_portable_type_test)

# Use C++14 for test.
set(CMAKE_CXX_STANDARD 14)
# Use C++17 for test.
set(CMAKE_CXX_STANDARD 17)

set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../../..)

Expand Down
4 changes: 2 additions & 2 deletions runtime/core/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 3.19)
project(runtime_core_test)

# Use C++14 for test.
set(CMAKE_CXX_STANDARD 14)
# Use C++17 for test.
set(CMAKE_CXX_STANDARD 17)

set(EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../..)

Expand Down
4 changes: 2 additions & 2 deletions test/utils/OSSTest.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
cmake_minimum_required(VERSION 3.19)
project({project_name})

# Use C++14 for test.
set(CMAKE_CXX_STANDARD 14)
# Use C++17 for test.
set(CMAKE_CXX_STANDARD 17)

set(EXECUTORCH_ROOT ${{CMAKE_CURRENT_SOURCE_DIR}}/{path_to_root})

Expand Down

0 comments on commit ae311b4

Please sign in to comment.