diff options
author | Jeff Donahue <jeff.donahue@gmail.com> | 2015-09-17 00:33:11 -0700 |
---|---|---|
committer | Jeff Donahue <jeff.donahue@gmail.com> | 2015-09-17 00:33:11 -0700 |
commit | 5ff3734fefe5a432c62df81c9370df41638d8d60 (patch) | |
tree | 1010ea27ec4e135f735f3c500ecfba3434dda5d7 /examples/mnist/convert_mnist_data.cpp | |
parent | 71e05876f644a08af4cb1c955d01c5a272539e96 (diff) | |
parent | 68c9e2b4703ce18fd9a7ab541addf701129a8080 (diff) | |
download | caffeonacl-5ff3734fefe5a432c62df81c9370df41638d8d60.tar.gz caffeonacl-5ff3734fefe5a432c62df81c9370df41638d8d60.tar.bz2 caffeonacl-5ff3734fefe5a432c62df81c9370df41638d8d60.zip |
Merge pull request #2523 from BonsaiAI/separate-io-dependencies
Separate dependencies for configurable installation
Diffstat (limited to 'examples/mnist/convert_mnist_data.cpp')
-rw-r--r-- | examples/mnist/convert_mnist_data.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/mnist/convert_mnist_data.cpp b/examples/mnist/convert_mnist_data.cpp index 54443f11..8f29bafd 100644 --- a/examples/mnist/convert_mnist_data.cpp +++ b/examples/mnist/convert_mnist_data.cpp @@ -9,9 +9,13 @@ #include <gflags/gflags.h> #include <glog/logging.h> #include <google/protobuf/text_format.h> + +#if defined(USE_LEVELDB) && defined(USE_LMDB) #include <leveldb/db.h> #include <leveldb/write_batch.h> #include <lmdb.h> +#endif + #include <stdint.h> #include <sys/stat.h> @@ -20,6 +24,8 @@ #include "caffe/proto/caffe.pb.h" +#if defined(USE_LEVELDB) && defined(USE_LMDB) + using namespace caffe; // NOLINT(build/namespaces) using std::string; @@ -196,3 +202,9 @@ int main(int argc, char** argv) { } return 0; } +#else +int main(int argc, char** argv) { + LOG(FATAL) << "This example requires LevelDB and LMDB; " << + "compile with USE_LEVELDB and USE_LMDB."; +} +#endif // USE_LEVELDB and USE_LMDB |