提交 ae821e5e 编写于 作者: Q Qiao Longfei 提交者: GitHub

fix glog problem (#81)

上级 f7d55bc8
......@@ -21,8 +21,10 @@ option(ON_RELEASE "RELEASE mode" ON)
include(external/zlib) # download, build, install zlib
include(external/gflags) # download, build, install gflags
include(external/glog) # download, build, install glog
if (NOT ON_RELEASE)
include(external/gflags) # download, build, install gflags
include(external/glog) # download, build, install glog
endif(NOT ON_RELEASE)
include(external/gtest) # download, build, install gtest
include(external/eigen) # download eigen
include(external/pybind11) # download pybind11
......@@ -32,7 +34,7 @@ include(external/python) # find python and set path
if (NOT ON_RELEASE)
message(STATUS "build on debug mode")
add_compile_options(-DVISUALDL_WITH_GLOG)
add_definitions(-DVISUALDL_WITH_GLOG)
endif(NOT ON_RELEASE)
include_directories(${PROJECT_SOURCE_DIR})
......
add_library(im ${PROJECT_SOURCE_DIR}/visualdl/logic/im.cc)
add_library(sdk ${PROJECT_SOURCE_DIR}/visualdl/logic/sdk.cc ${PROJECT_SOURCE_DIR}/visualdl/utils/image.h)
add_dependencies(im storage_proto)
add_dependencies(sdk entry storage storage_proto)
add_dependencies(sdk entry storage storage_proto eigen3)
## pybind
add_library(core SHARED ${PROJECT_SOURCE_DIR}/visualdl/logic/pybind.cc)
add_dependencies(core pybind python im entry tablet storage sdk protobuf glog eigen3)
target_link_libraries(core PRIVATE pybind entry python im tablet storage sdk protobuf glog)
if (NOT ON_RELEASE)
add_dependencies(core pybind python im entry tablet storage sdk protobuf glog eigen3)
target_link_libraries(core PRIVATE pybind entry python im tablet storage sdk protobuf glog)
else()
add_dependencies(core pybind python im entry tablet storage sdk protobuf eigen3)
target_link_libraries(core PRIVATE pybind entry python im tablet storage sdk protobuf)
endif()
set_target_properties(core PROPERTIES PREFIX "" SUFFIX ".so")
#ifndef VISUALDL_LOGIC_HISTOGRAM_H
#define VISUALDL_LOGIC_HISTOGRAM_H
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <cstdlib>
#include <limits>
#include <vector>
......
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <ctime>
#include "visualdl/logic/im.h"
......
#ifndef VISUALDL_LOGIC_IM_H
#define VISUALDL_LOGIC_IM_H
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <memory>
#include <mutex>
#include <string>
......
#ifndef VISUALDL_STORAGE_STORAGE_H
#define VISUALDL_STORAGE_STORAGE_H
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <algorithm>
#include <set>
#include <vector>
......
#ifndef VISUALDL_TABLET_H
#define VISUALDL_TABLET_H
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include "visualdl/logic/im.h"
#include "visualdl/storage/record.h"
......
#ifndef VISUALDL_UTILS_CONCURRENCY_H
#define VISUALDL_UTILS_CONCURRENCY_H
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <chrono>
#include <memory>
#include <thread>
......
......@@ -44,7 +44,7 @@ bool DeSerializeFromFile(T* proto, const std::string& path) {
}
static void TryMkdir(const std::string& dir) {
VLOG(1) << "try to mkdir " << dir;
// VLOG(1) << "try to mkdir " << dir;
struct stat st = {0};
if (stat(dir.c_str(), &st) == -1) {
::mkdir(dir.c_str(), 0700);
......
#ifndef VISUALDL_UTILS_IMAGE_H
#define VISUALDL_UTILS_IMAGE_H
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <Eigen/Core>
#include <unsupported/Eigen/CXX11/Tensor>
......
......@@ -8,7 +8,7 @@
#include <string>
#if defined(VISUALDL_WITH_GLOG)
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#endif
namespace visualdl {
......
#include "visualdl/utils/concurrency.h"
#include <glog/logging.h>
#include "visualdl/utils/logging.h"
#include <gtest/gtest.h>
namespace visualdl {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册