From a12dcba8c9417c5d8f8155e06bdfd6e75fd636ce Mon Sep 17 00:00:00 2001 From: Anatoly Baksheev Date: Sun, 18 Jan 2015 22:55:26 +0300 Subject: [PATCH] opencv 3.0 compilation (replace #1714) --- cmake/lint.cmake | 4 +++- src/caffe/layers/window_data_layer.cpp | 5 +---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cmake/lint.cmake b/cmake/lint.cmake index 04df340..585babb 100644 --- a/cmake/lint.cmake +++ b/cmake/lint.cmake @@ -1,10 +1,12 @@ -set(CMAKE_SOURCE_DIR ../) +set(CMAKE_SOURCE_DIR ..) set(LINT_COMMAND ${CMAKE_SOURCE_DIR}/scripts/cpp_lint.py) set(SRC_FILE_EXTENSIONS h hpp hu c cpp cu cc) set(EXCLUDE_FILE_EXTENSTIONS pb.h pb.cc) set(LINT_DIRS include src/caffe examples tools python matlab) +cmake_policy(SET CMP0009 NEW) # supress cmake warning + # find all files of interest foreach(ext ${SRC_FILE_EXTENSIONS}) foreach(dir ${LINT_DIRS}) diff --git a/src/caffe/layers/window_data_layer.cpp b/src/caffe/layers/window_data_layer.cpp index 23ec83d..3e9e976 100644 --- a/src/caffe/layers/window_data_layer.cpp +++ b/src/caffe/layers/window_data_layer.cpp @@ -1,3 +1,4 @@ +#include #include #include @@ -22,10 +23,6 @@ // 'source' field specifies the window_file // 'crop_size' indicates the desired warped size -#if CV_VERSION_MAJOR == 3 -const int CV_LOAD_IMAGE_COLOR = cv::IMREAD_COLOR; -#endif - namespace caffe { template -- 2.7.4