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()
143
143
set (CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE} " )
144
144
endif ()
145
145
146
+ if (EXECUTORCH_BUILD_TESTS)
147
+ set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
148
+ include (CTest)
149
+ endif ()
150
+
146
151
add_subdirectory (third-party)
147
152
148
153
if (EXECUTORCH_BUILD_EXTENSION_TRAINING)
@@ -254,11 +259,6 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
254
259
)
255
260
endif ()
256
261
257
- if (EXECUTORCH_BUILD_TESTS)
258
- set (EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON )
259
- include (CTest)
260
- endif ()
261
-
262
262
# TODO(dbort): Fix these warnings and remove this flag.
263
263
set (_common_compile_options -Wno-deprecated-declarations -fPIC)
264
264
@@ -472,11 +472,6 @@ install(
472
472
)
473
473
install (FILES tools/cmake/executorch-config.cmake DESTINATION lib/cmake/ExecuTorch)
474
474
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
-
480
475
if (EXECUTORCH_BUILD_ARM_BAREMETAL)
481
476
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /backends/arm)
482
477
endif ()
Original file line number Diff line number Diff line change @@ -10,6 +10,10 @@ if(EXECUTORCH_BUILD_PYBIND)
10
10
add_subdirectory (pybind11)
11
11
endif ()
12
12
13
+ if (BUILD_TESTING)
14
+ add_subdirectory (googletest)
15
+ endif ()
16
+
13
17
# MARK: - flatbuffers
14
18
15
19
if (WIN32 )
You can’t perform that action at this time.
0 commit comments