mirror of
https://github.com/yse/easy_profiler.git
synced 2024-12-27 00:31:02 +08:00
Gcc compile fix
This commit is contained in:
parent
cbcfe4c184
commit
d8f44ba559
@ -27,7 +27,7 @@ include_directories(
|
||||
)
|
||||
|
||||
if(UNIX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -Wno-reorder -pedantic -O3" )
|
||||
else()
|
||||
add_definitions(
|
||||
|
@ -99,7 +99,11 @@ Name of the block automatically created with function name.
|
||||
|
||||
\ingroup profiler
|
||||
*/
|
||||
#define EASY_FUNCTION(...) EASY_BLOCK(__func__ , ## __VA_ARGS__)
|
||||
#define EASY_FUNCTION(...)\
|
||||
static const ::profiler::StaticBlockDescriptor EASY_UNIQUE_DESC(__LINE__)(__func__, __FILE__, __LINE__,\
|
||||
::profiler::BLOCK_TYPE_BLOCK , ## __VA_ARGS__);\
|
||||
::profiler::Block EASY_UNIQUE_BLOCK(__LINE__)(::profiler::BLOCK_TYPE_BLOCK, EASY_UNIQUE_DESC(__LINE__).id(), "");\
|
||||
::profiler::beginBlock(EASY_UNIQUE_BLOCK(__LINE__)); // this is to avoid compiler warning about unused variable
|
||||
|
||||
/** Macro of completion of last nearest open block.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user