Commit 1e4ac3cd by Tianqi Chen Committed by GitHub

[BUILD] restrict runtime include headers (#1444)

parent 12cf7754
...@@ -48,11 +48,8 @@ tvm_option(USE_RANDOM "Build with random support" OFF) ...@@ -48,11 +48,8 @@ tvm_option(USE_RANDOM "Build with random support" OFF)
# include directories # include directories
include_directories("include") include_directories("include")
include_directories("nnvm/include")
include_directories("dmlc-core/include")
include_directories("HalideIR/src")
include_directories("dlpack/include") include_directories("dlpack/include")
include_directories("topi/include") include_directories("dmlc-core/include")
# initial variables # initial variables
set(TVM_LINKER_LIBS "") set(TVM_LINKER_LIBS "")
...@@ -169,6 +166,19 @@ target_link_libraries(tvm_topi tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS} ...@@ -169,6 +166,19 @@ target_link_libraries(tvm_topi tvm ${TVM_LINKER_LIBS} ${TVM_RUNTIME_LINKER_LIBS}
target_link_libraries(tvm_runtime ${TVM_RUNTIME_LINKER_LIBS}) target_link_libraries(tvm_runtime ${TVM_RUNTIME_LINKER_LIBS})
target_link_libraries(nnvm_compiler tvm) target_link_libraries(nnvm_compiler tvm)
# Related headers
target_include_directories(
tvm
PUBLIC "HalideIR/src"
PUBLIC "topi/include")
target_include_directories(
tvm_topi
PUBLIC "topi/include")
target_include_directories(
nnvm_compiler
PUBLIC "nnvm/include"
PUBLIC "topi/include")
# Tests # Tests
set(TEST_EXECS "") set(TEST_EXECS "")
file(GLOB TEST_SRCS tests/cpp/*.cc) file(GLOB TEST_SRCS tests/cpp/*.cc)
......
...@@ -11,7 +11,7 @@ ifndef DLPACK_PATH ...@@ -11,7 +11,7 @@ ifndef DLPACK_PATH
DLPACK_PATH = $(ROOTDIR)/dlpack DLPACK_PATH = $(ROOTDIR)/dlpack
endif endif
INCLUDE_FLAGS = -Iinclude -I$(DLPACK_PATH)/include -I$(DMLC_CORE_PATH)/include -IHalideIR/src -Itopi/include INCLUDE_FLAGS = -Iinclude -I$(DLPACK_PATH)/include -I$(DMLC_CORE_PATH)/include
PKG_CFLAGS = -std=c++11 -Wall -O2 $(INCLUDE_FLAGS) -fPIC PKG_CFLAGS = -std=c++11 -Wall -O2 $(INCLUDE_FLAGS) -fPIC
PKG_LDFLAGS = PKG_LDFLAGS =
......
...@@ -8,7 +8,7 @@ PKG_CFLAGS = -std=c++11 -O2 -fPIC\ ...@@ -8,7 +8,7 @@ PKG_CFLAGS = -std=c++11 -O2 -fPIC\
-I${DMLC_CORE}/include\ -I${DMLC_CORE}/include\
-I${TVM_ROOT}/dlpack/include\ -I${TVM_ROOT}/dlpack/include\
PKG_LDFLAGS = -L${TVM_ROOT}/lib -ldl -lpthread PKG_LDFLAGS = -L${TVM_ROOT}/build -ldl -lpthread
.PHONY: clean all .PHONY: clean all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment