exclude de_tensor in normal build

This commit is contained in:
ervinzhang 2020-08-04 14:15:05 -04:00
parent 344f1c9b64
commit 1f13b3ef6d
4 changed files with 12 additions and 5 deletions

View File

@ -13,6 +13,4 @@ add_library(cpp-API OBJECT
iterator.cc
transforms.cc
samplers.cc
de_tensor.cc
execute.cc
)

View File

@ -38,18 +38,21 @@
#include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/core/tensor_shape.h"
#include "minddata/dataset/util/status.h"
#include "minddata/dataset/include/de_tensor.h"
#ifndef ENABLE_ANDROID
#include "proto/example.pb.h"
#else
#include "minddata/dataset/include/de_tensor.h"
#endif
#ifdef ENABLE_PYTHON
namespace py = pybind11;
#endif
namespace mindspore {
#ifdef ENABLE_ANDROID
namespace tensor {
class DETensor;
} // namespace tensor
#endif
namespace dataset {
class Tensor;
template <typename T>
@ -61,7 +64,9 @@ using offset_t = uint32_t; // type of offset va
using TensorPtr = std::shared_ptr<Tensor>;
class Tensor {
#ifdef ENABLE_ANDROID
friend class tensor::DETensor;
#endif
public:
Tensor() = delete;
Tensor(const Tensor &other) = delete;

View File

@ -38,18 +38,21 @@
#include "minddata/dataset/core/data_type.h"
#include "minddata/dataset/core/tensor_shape.h"
#include "minddata/dataset/util/status.h"
#include "minddata/dataset/include/de_tensor.h"
#ifndef ENABLE_ANDROID
#include "proto/example.pb.h"
#else
#include "minddata/dataset/include/de_tensor.h"
#endif
#ifdef ENABLE_PYTHON
namespace py = pybind11;
#endif
namespace mindspore {
#ifdef ENABLE_ANDROID
namespace tensor {
class DETensor;
} // namespace tensor
#endif
namespace dataset {
class Tensor;
template <typename T>
@ -61,7 +64,9 @@ using offset_t = uint32_t; // type of offset va
using TensorPtr = std::shared_ptr<Tensor>;
class Tensor {
#ifdef ENABLE_ANDROID
friend class tensor::DETensor;
#endif
public:
Tensor() = delete;
Tensor(const Tensor &other) = delete;

View File

@ -138,7 +138,6 @@ if (BUILD_MINDDATA)
include_directories(${TOP_DIR}/third_party/libjpeg-turbo/include)
add_compile_definitions(ENABLE_ANDROID)
add_compile_definitions(ENABLE_EAGER)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/minddata)
endif()