File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,11 @@ else()
143143 set (CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE} " )
144144endif ()
145145
146+ if (EXECUTORCH_BUILD_TESTS)
147+ set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
148+ include (CTest)
149+ endif ()
150+
146151add_subdirectory (third-party)
147152
148153if (EXECUTORCH_BUILD_EXTENSION_TRAINING)
@@ -254,11 +259,6 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
254259 )
255260endif ()
256261
257- if (EXECUTORCH_BUILD_TESTS)
258- set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
259- include (CTest)
260- endif ()
261-
262262# TODO(dbort): Fix these warnings and remove this flag.
263263set (_common_compile_options -Wno-deprecated-declarations -fPIC)
264264
@@ -472,11 +472,6 @@ install(
472472)
473473install (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-
480475if (EXECUTORCH_BUILD_ARM_BAREMETAL)
481476 add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/arm)
482477endif ()
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ if(EXECUTORCH_BUILD_PYBIND)
1010 add_subdirectory (pybind11)
1111endif ()
1212
13+ if (BUILD_TESTING)
14+ add_subdirectory (googletest)
15+ endif ()
16+
1317# MARK: - flatbuffers
1418
1519if (WIN32 )
You can’t perform that action at this time.
0 commit comments