summaryrefslogtreecommitdiff
path: root/torch
diff options
context:
space:
mode:
authorZachary DeVito <zdevito@fb.com>2019-02-05 22:36:48 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-02-05 22:39:51 -0800
commit255136fc1dd040fd51b346b459d2d8fb8d1f895e (patch)
treea65206f81a2dd114563a2b078d8b590110523e38 /torch
parentab035d01e386363eb87a97b39825b932a662a6fb (diff)
downloadpytorch-255136fc1dd040fd51b346b459d2d8fb8d1f895e.tar.gz
pytorch-255136fc1dd040fd51b346b459d2d8fb8d1f895e.tar.bz2
pytorch-255136fc1dd040fd51b346b459d2d8fb8d1f895e.zip
fix BUILD_CAFFE2_OPS
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/16783 Differential Revision: D13965061 Pulled By: zdevito fbshipit-source-id: 6fe710ca51e2f338873b56f23256668ca3fe2032
Diffstat (limited to 'torch')
-rw-r--r--torch/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt
index 347cb3d58c..d7678e452b 100644
--- a/torch/CMakeLists.txt
+++ b/torch/CMakeLists.txt
@@ -135,7 +135,6 @@ set(TORCH_SRCS
${TORCH_SRC_DIR}/csrc/jit/ir.cpp
${TORCH_SRC_DIR}/csrc/jit/operator.cpp
${TORCH_SRC_DIR}/csrc/jit/caffe2_operator.cpp
- ${TORCH_SRC_DIR}/csrc/jit/register_caffe2_ops.cpp
${TORCH_SRC_DIR}/csrc/jit/symbolic_script.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/alias_analysis.cpp
${TORCH_SRC_DIR}/csrc/jit/passes/batch_mm.cpp
@@ -191,6 +190,11 @@ set(TORCH_SRCS
${TORCH_ROOT}/test/cpp/jit/no-gtest.cpp
)
+if (BUILD_CAFFE2_OPS)
+ list(APPEND TORCH_SRCS
+ ${TORCH_SRC_DIR}/csrc/jit/register_caffe2_ops.cpp)
+endif()
+
if (WIN32)
list(APPEND TORCH_SRCS
${TORCH_SRC_DIR}/csrc/jit/fuser/cpu/dynamic_library_win.cpp