Skip to content

Commit c000a68

Browse files
committed
✨ Refactor test configuration and extension setup
1 parent 8f589b8 commit c000a68

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ announce_configured_options(PYTHON_EXECUTABLE)
7575
announce_configured_options(CMAKE_CXX_COMPILER_ID)
7676
announce_configured_options(CMAKE_TOOLCHAIN_FILE)
7777
announce_configured_options(BUCK2)
78-
announce_configured_options(BUILD_TESTING)
7978

8079
load_build_preset()
8180
include(${PROJECT_SOURCE_DIR}/tools/cmake/preset/default.cmake)
@@ -144,6 +143,11 @@ else()
144143
set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
145144
endif()
146145

146+
if(EXECUTORCH_BUILD_TESTS)
147+
set(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
148+
include(CTest)
149+
endif()
150+
147151
add_subdirectory(third-party)
148152

149153
if(EXECUTORCH_BUILD_EXTENSION_TRAINING)
@@ -255,11 +259,6 @@ if(EXECUTORCH_BUILD_PTHREADPOOL)
255259
)
256260
endif()
257261

258-
if(EXECUTORCH_BUILD_TESTS)
259-
set(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR ON)
260-
include(CTest)
261-
endif()
262-
263262
# TODO(dbort): Fix these warnings and remove this flag.
264263
set(_common_compile_options -Wno-deprecated-declarations -fPIC)
265264

0 commit comments

Comments
 (0)