Skip to content

Commit ce52ed3

Browse files
committed
Turn BUILD_TESTING off if EXECUTORCH_BUILD_TESTS is off
As the comment notes, it looks like otherwise we have third-party deps that might include(CTest) and thereby turn on testing even though our specific option is off. (Should we get rid of the specific option or more directly alias it to BUILD_TESTING?) ghstack-source-id: 50971cb ghstack-comment-id: 3081826265 Pull-Request: #12566
1 parent d08e46b commit ce52ed3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ endif()
165165

166166
if(EXECUTORCH_BUILD_TESTS)
167167
include(CTest)
168+
else()
169+
# It looks like some of our third-party deps will try to turn this
170+
# on if it's not explicitly set, leading to confusing behavior.
171+
set(BUILD_TESTING OFF)
168172
endif()
169173

170174
add_subdirectory(third-party)

0 commit comments

Comments
 (0)