Skip to content

Commit 0baba26

Browse files
committed
wip ∫ ✨ Refactor googletest inclusion for improved build configuration
1 parent 6fafe7c commit 0baba26

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CMakeLists.txt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,11 +472,6 @@ install(
472472
)
473473
install(FILES tools/cmake/executorch-config.cmake DESTINATION lib/cmake/ExecuTorch)
474474

475-
# Add googletest if any test targets should be built
476-
if(BUILD_TESTING)
477-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third-party/googletest)
478-
endif()
479-
480475
if(EXECUTORCH_BUILD_ARM_BAREMETAL)
481476
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/backends/arm)
482477
endif()

third-party/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ if(EXECUTORCH_BUILD_PYBIND)
1010
add_subdirectory(pybind11)
1111
endif()
1212

13+
if(BUILD_TESTING)
14+
add_subdirectory(googletest)
15+
endif()
16+
1317
# MARK: - flatbuffers
1418

1519
if(WIN32)

0 commit comments

Comments
 (0)