Commit 1411a5ac by Chris Olivier Committed by Tianqi Chen

CMake/make adjustments and warning fix (#106)

* CMake/make adjustments and warning fix

* Fix warnings
parent 93ba9486
......@@ -4,6 +4,10 @@ project(nnvm C CXX)
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/build/private/local_config.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/build/private/local_config.cmake)
endif()
include(cmake/Utils.cmake)
# include path
......@@ -57,9 +61,16 @@ elseif(DMLC_CORE_PATH)
include_directories(${DMLC_CORE_PATH}/include)
endif()
add_library(nnvm ${SOURCE})
add_library(nnvm SHARED ${SOURCE})
target_link_libraries(nnvm ${nnvm_LINKER_LIBS})
if(INSTALL_INCLUDE_DIR)
add_custom_command(TARGET nnvm POST_BUILD
COMMAND COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_SOURCE_DIR}/include ${INSTALL_INCLUDE_DIR}/
)
endif()
# ---[ Linter target
if(MSVC)
find_package(PythonInterp 2)
......
......@@ -18,6 +18,12 @@ else
CFLAGS += -I$(ROOTDIR)/dmlc-core/include
endif
ifdef DMLC_CORE_PATH
CFLAGS += -I$(DMLC_CORE_PATH)/include
else
CFLAGS += -I$(ROOTDIR)/dmlc-core/include
endif
ifneq ($(ADD_CFLAGS), NONE)
CFLAGS += $(ADD_CFLAGS)
endif
......
......@@ -443,7 +443,7 @@ class TShape : public Tuple<index_t> {
*/
template<int dim>
inline mshadow::Shape<dim> get() const {
CHECK_EQ(dim, ndim())
CHECK_EQ(dim, static_cast<int>(ndim()))
<< "dimension do not match target dimension " << dim << " vs " << ndim();
const index_t *d = this->data();
mshadow::Shape<dim> s;
......
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