Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yohahaha committed Dec 27, 2023
1 parent 68bd9ff commit 74a1c11
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
8 changes: 1 addition & 7 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,7 @@ include(ResolveDependency)
# Compiler flags
#

if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
# keep this original logic
add_definitions(-DGLUTEN_PRINT_DEBUG)
message(STATUS "Add definition GLUTEN_PRINT_DEBUG")
elseif (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_definitions(-DGLUTEN_PRINT_DEBUG)
message(STATUS "Add definition GLUTEN_PRINT_DEBUG")
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb -O0")
message(STATUS "CMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}")
else ()
Expand Down
6 changes: 0 additions & 6 deletions cpp/core/utils/Print.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ namespace gluten {
// the token `ToString` means the method of `ToString()`
// the token `2String` means the method of `toString()`

#ifdef GLUTEN_PRINT_DEBUG

template <typename T>
static inline void print(const T& t) {
std::cout << t;
Expand Down Expand Up @@ -208,8 +206,6 @@ static inline void printVectorRange(const V& v, unsigned int begin, unsigned int

#define PRINT_VECTOR_MAPPING(v) PrintVectorMapping(v, #v)

#else // GLUTEN_PRINT_DEBUG

template <typename T>
static inline void Print(const T& t) {}

Expand Down Expand Up @@ -292,6 +288,4 @@ static inline void PrintVectorRange(const V& v, unsigned int from, unsigned int

#define PRINT_VECTOR_MAPPING(v)

#endif // GLUTEN_PRINT_DEBUG

} // namespace gluten

0 comments on commit 74a1c11

Please sign in to comment.