Skip to content

Commit 613a636

Browse files
Disable caffe2 build (#901)
1 parent 0f78002 commit 613a636

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ option(BUILD_BINARY "Build C++ binaries" OFF)
148148
option(BUILD_DOCS "Build Caffe2 documentation" OFF)
149149
option(BUILD_CUSTOM_PROTOBUF "Build and use Caffe2's own protobuf under third_party" ON)
150150
option(BUILD_PYTHON "Build Python binaries" ON)
151-
option(BUILD_CAFFE2 "Master flag to build Caffe2" ON)
151+
option(BUILD_CAFFE2 "Master flag to build Caffe2" OFF)
152152
option(BUILD_LITE_INTERPRETER "Master flag to build Lite Interpreter" OFF)
153153
cmake_dependent_option(
154154
BUILD_CAFFE2_OPS "Build Caffe2 operators" ON

caffe2/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ if(BUILD_CAFFE2 AND (NOT INTERN_BUILD_MOBILE OR BUILD_CAFFE2_MOBILE))
161161
# add_subdirectory(test) # todo: use caffe2_gtest_main instead of gtest_main because we will need to call GlobalInit
162162
add_subdirectory(transforms)
163163
endif()
164-
if(NOT BUILD_CAFFE2)
164+
if(NOT BUILD_CAFFE2 AND (NOT INTERN_BUILD_MOBILE OR BUILD_CAFFE2_MOBILE))
165165
add_subdirectory(proto)
166166
endif()
167167

@@ -1817,7 +1817,7 @@ if(BUILD_TEST)
18171817
endif()
18181818

18191819
# For special tests that explicitly uses dependencies, we add them here
1820-
if(USE_MPI)
1820+
if(BUILD_CAFFE2 AND USE_MPI)
18211821
target_link_libraries(mpi_test ${MPI_CXX_LIBRARIES})
18221822
if(USE_CUDA)
18231823
target_link_libraries(mpi_gpu_test ${MPI_CXX_LIBRARIES})

0 commit comments

Comments
 (0)