Skip to content

Commit

Permalink
fix compile with on_release off (PaddlePaddle#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
Superjomn authored Jan 12, 2018
1 parent 96e2374 commit 7780126
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/storage)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/logic)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/visualdl/python)

# compile test only in release mode
if (NOT ON_RELEASE)
add_executable(vl_test
${PROJECT_SOURCE_DIR}/visualdl/test.cc
Expand Down
2 changes: 1 addition & 1 deletion visualdl/logic/im.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "visualdl/utils/logging.h"
#include <ctime>

#include "visualdl/logic/im.h"
#include "visualdl/storage/entry.h"
#include "visualdl/storage/storage.h"
#include "visualdl/storage/tablet.h"
#include "visualdl/utils/logging.h"

namespace visualdl {

Expand Down
2 changes: 1 addition & 1 deletion visualdl/logic/im.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#ifndef VISUALDL_LOGIC_IM_H
#define VISUALDL_LOGIC_IM_H

#include "visualdl/utils/logging.h"
#include <memory>
#include <mutex>
#include <string>

#include "visualdl/utils/concurrency.h"
#include "visualdl/utils/guard.h"
#include "visualdl/utils/logging.h"

namespace visualdl {

Expand Down
2 changes: 1 addition & 1 deletion visualdl/utils/image.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef VISUALDL_UTILS_IMAGE_H
#define VISUALDL_UTILS_IMAGE_H

#include "visualdl/utils/logging.h"
#include <Eigen/Core>
#include <unsupported/Eigen/CXX11/Tensor>
#include "visualdl/utils/logging.h"

namespace visualdl {

Expand Down
11 changes: 1 addition & 10 deletions visualdl/utils/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <string>

#if defined(VISUALDL_WITH_GLOG)
#include "visualdl/utils/logging.h"
#include <glog/logging.h>
#endif

namespace visualdl {
Expand Down Expand Up @@ -110,15 +110,6 @@ class NotImplementedException : public std::logic_error {
NotImplementedException() : std::logic_error{"Function not implemented"} {}
};

static void SignalHandler(int sig) {
LOG(INFO) << "get signal " << sig;
exit(sig);
}

struct __once_caller__ {
__once_caller__() { std::signal(SIGINT, SignalHandler); }
};

} // namespace log

} // namespace visualdl
Expand Down

0 comments on commit 7780126

Please sign in to comment.