summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorYangqing Jia <jiayq84@gmail.com>2017-10-26 12:20:50 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2017-10-26 12:33:58 -0700
commit545c0937fbbfe1a9a28408c3b0f120738d39d9d4 (patch)
treee60042c0dc58f55476d43a58002e5b44bac5abd5 /CMakeLists.txt
parentc3a4bc5d737decfda20664f19f49f9831e6e68ea (diff)
downloadpytorch-545c0937fbbfe1a9a28408c3b0f120738d39d9d4.tar.gz
pytorch-545c0937fbbfe1a9a28408c3b0f120738d39d9d4.tar.bz2
pytorch-545c0937fbbfe1a9a28408c3b0f120738d39d9d4.zip
Making a module option for Caffe2
Summary: This will help releasing models that are using Caffe2 but have their own operator implementations and extensions. More detailed docs to arrive later. Let's see what contbuild says. Closes https://github.com/caffe2/caffe2/pull/1378 Differential Revision: D6155045 Pulled By: Yangqing fbshipit-source-id: 657a4c8de2f8e095bad5ed5db5b3e476b2a877e1
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 001077a523..cad71ac5a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -46,6 +46,11 @@ option(USE_ZMQ "Use ZMQ" OFF)
# ---[ CMake scripts + modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
+# ---[ CMake build directories
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+
enable_testing()
# External projects
@@ -77,9 +82,6 @@ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.8.0
list(APPEND Caffe2_DEPENDENCY_LIBS gcc_s gcc)
endif()
-# ---[ Set output directories
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "binaries")
-
# ---[ Build flags
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
if(NOT MSVC)
@@ -174,3 +176,7 @@ if (NOT ANDROID)
FILE Caffe2Targets.cmake
COMPONENT dev)
endif()
+
+
+# ---[ Modules
+add_subdirectory(modules/module_test)