File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,14 +17,16 @@ add_definitions(-D${OS_NAME})
1717if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
1818 add_definitions (-O4 )
1919 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0" )
20- add_definitions (-Wno-attributes -D_NO_PUT_TIME )
20+ add_definitions (-Wno-attributes )
2121 endif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9.0" )
2222 if (CMAKE_BUILD_TYPE MATCHES "Debug" )
2323 add_definitions (-ggdb )
2424 endif (CMAKE_BUILD_TYPE MATCHES "Debug" )
2525elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
2626 if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4.0" )
2727 add_definitions (-Wno-attributes )
28+ else (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4.0" )
29+ add_definitions (-D_WITH_PUT_TIME )
2830 endif (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "3.4.0" )
2931 if (CMAKE_BUILD_TYPE MATCHES "Debug" )
3032 add_definitions (-g )
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ extern std::mutex g_log_mutex;
3535#define _LOGMUTEX
3636#endif
3737
38- #ifndef _NO_PUT_TIME
38+ #ifdef _WITH_PUT_TIME
3939#define ttime_init \
4040 std::time_t t = std::time(nullptr ); \
4141 std::tm tm = *std::localtime (&t);
You can’t perform that action at this time.
0 commit comments