Skip to content

Commit

Permalink
Fixed CMake and CPP build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Lyudvichenko committed Jun 20, 2015
1 parent 48ab440 commit 867cadc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions modules/dnn/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if(${PROTOBUF_FOUND} AND EXISTS ${PROTOBUF_PROTOC_EXECUTABLE})
file(GLOB PROTO_FILES src/*.proto)
PROTOBUF_GENERATE_CPP(PROTO_HDRS PROTO_SRCS ${PROTO_FILES})
set(HAVE_PROTOBUF ON)
add_definitions(-DHAVE_PROTOBUF 1)
add_definitions(-DHAVE_PROTOBUF=1)
else()
message(STATUS "PROTOBUF not found. Caffe import function will be disabled.")
set(HAVE_PROTOBUF OFF)
Expand All @@ -19,9 +19,9 @@ endif()
endmacro(_dnn_find_protobuf)

if(BUILD_opencv_core)#build as OpenCV module
_dnn_find_protobuf()
set(the_description "Deep neural network module. It allows to load models and to make forward pass")
set(OPENCV_MODULE_IS_PART_OF_WORLD OFF)
_dnn_find_protobuf()

ocv_add_module(dnn opencv_imgproc opencv_core opencv_highgui WRAP python matlab)
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wno-shadow -Wno-parentheses)
Expand Down
2 changes: 1 addition & 1 deletion modules/dnn/include/opencv2/dnn/dict.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct DictValue
void release();
};

class Dict
class CV_EXPORTS Dict
{
//TODO: maybe this mechanism was realized somewhere in OpenCV?
typedef std::map<String, DictValue> _Dict;
Expand Down
8 changes: 4 additions & 4 deletions modules/dnn/src/dnn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ struct LayerOutId
struct LayerData
{
LayerData() {}
LayerData(const String &_name, const String &_type, LayerParams &_params = LayerParams())
: name(_name), type(_type), params(_params)
{}
LayerData(const String &_name, const String &_type, LayerParams &_params)
: name(_name), type(_type), params(_params) {}

String name;
String type;
Expand Down Expand Up @@ -179,7 +178,8 @@ struct Net::Impl
{
Impl()
{
layers.insert(make_pair(0, LayerData("_input", "_input")));
LayerParams paramsEmpty;
layers.insert(make_pair(0, LayerData("_input", "_noType", paramsEmpty)));
lastLayerId = 1;
netWasAllocated = false;
}
Expand Down

0 comments on commit 867cadc

Please sign in to comment.