Skip to content

Commit 6bb8ef1

Browse files
committed
windows build fix: omit matio; fix for gtest.h path.
1 parent 2df8790 commit 6bb8ef1

File tree

7 files changed

+16
-0
lines changed

7 files changed

+16
-0
lines changed

include/caffe/layers/mat_read_layer.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ndefined(_MSC_VER)
12
#ifndef CAFFE_MAT_READ_LAYER_HPP_
23
#define CAFFE_MAT_READ_LAYER_HPP_
34

@@ -39,3 +40,4 @@ class MatReadLayer : public Layer<Dtype> {
3940
} // namespace caffe
4041

4142
#endif // CAFFE_MAT_READ_LAYER_HPP_
43+
#endif

include/caffe/layers/mat_write_layer.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ndefined(_MSC_VER)
12
#ifndef CAFFE_MAT_WRITE_LAYER_HPP_
23
#define CAFFE_MAT_WRITE_LAYER_HPP_
34

@@ -40,3 +41,4 @@ class MatWriteLayer : public Layer<Dtype> {
4041
} // namespace caffe
4142

4243
#endif // CAFFE_MAT_WRITE_LAYER_HPP_
44+
#endif

include/caffe/test/test_caffe_main.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
#define CAFFE_TEST_TEST_CAFFE_MAIN_HPP_
55

66
#include <glog/logging.h>
7+
#if defined(_MSC_VER)
8+
#include "../../../src/gtest/gtest.h"
9+
#else
710
#include <gtest/gtest.h>
11+
#endif
812

913
#include <cstdio>
1014
#include <cstdlib>

include/caffe/util/matio_io.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ndefined(_MSC_VER)
12
#ifndef CAFFE_UTIL_MATIO_IO_H_
23
#define CAFFE_UTIL_MATIO_IO_H_
34

@@ -28,3 +29,4 @@ void WriteBlobToMat(const char *fname, bool write_diff,
2829
} // namespace caffe
2930

3031
#endif // CAFFE_UTIL_IO_H_
32+
#endif

src/caffe/layers/mat_read_layer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ndefined(_MSC_VER)
12
#include <vector>
23

34
#include "caffe/common.hpp"
@@ -104,3 +105,4 @@ INSTANTIATE_CLASS(MatReadLayer);
104105
REGISTER_LAYER_CLASS(MatRead);
105106

106107
} // namespace caffe
108+
#endif

src/caffe/layers/mat_write_layer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ndefined(_MSC_VER)
12
#include <sstream>
23
#include <vector>
34

@@ -69,3 +70,4 @@ INSTANTIATE_CLASS(MatWriteLayer);
6970
REGISTER_LAYER_CLASS(MatWrite);
7071

7172
} // namespace caffe
73+
#endif

src/caffe/util/matio_io.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if ndefined(_MSC_VER)
12
#include <stdint.h>
23

34
#include <fstream> // NOLINT(readability/streams)
@@ -102,3 +103,4 @@ template void WriteBlobToMat<int>(const char*, bool, Blob<int>*);
102103
template void WriteBlobToMat<unsigned int>(const char*, bool, Blob<unsigned int>*);
103104

104105
}
106+
#endif

0 commit comments

Comments
 (0)