From 74a1c11ad2f6c7e896c413cad438c123ac9af3ee Mon Sep 17 00:00:00 2001 From: yangchuan Date: Tue, 26 Dec 2023 14:42:45 +0800 Subject: [PATCH] fix --- cpp/CMakeLists.txt | 8 +------- cpp/core/utils/Print.h | 6 ------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 48eaa4f83a576..176d08b716b80 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -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 () diff --git a/cpp/core/utils/Print.h b/cpp/core/utils/Print.h index 06cb34da788b1..33e75ac4357f8 100644 --- a/cpp/core/utils/Print.h +++ b/cpp/core/utils/Print.h @@ -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 static inline void print(const T& t) { std::cout << t; @@ -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 static inline void Print(const T& t) {} @@ -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