0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-25 23:40:51 +08:00

Add bazel build for easy profiler core

This commit is contained in:
Sergey Yagovtsev 2019-12-02 19:51:25 +03:00
parent 47c3ddc09f
commit bb889d4d31
6 changed files with 24 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
bin bin
*build* *build*
!BUILD
.* .*
*.user *.user
/*.prof /*.prof
.idea/ .idea/
bazel*

0
WORKSPACE Normal file
View File

13
easy_profiler_core/BUILD Normal file
View File

@ -0,0 +1,13 @@
cc_library(
name = "easy_profiler",
srcs = glob(["**/*.cpp", "**/*.h"]),
hdrs = glob(["include/**"]),
includes = ["include", "."],
visibility = ["//visibility:public"],
defines = [
"EASY_PROFILER_VERSION_MAJOR=2",
"EASY_PROFILER_VERSION_MINOR=1",
"EASY_PROFILER_VERSION_PATCH=0",
"BUILD_WITH_EASY_PROFILER=1",
]
)

View File

@ -45,6 +45,7 @@ The Apache License, Version 2.0 (the "License");
#include <easy/details/arbitrary_value_aux.h> #include <easy/details/arbitrary_value_aux.h>
#include <easy/details/profiler_public_types.h> #include <easy/details/profiler_public_types.h>
#include <string>
#include <string.h> #include <string.h>
namespace profiler namespace profiler

View File

@ -303,7 +303,7 @@ PROFILER_API const profiler::BaseBlockDescriptor* registerDescription(profiler::
const char*, const char*, int, const char*, const char*, int,
profiler::block_type_t, profiler::color_t, bool) profiler::block_type_t, profiler::color_t, bool)
{ {
return reinterpret_cast<const BaseBlockDescriptor*>(0xbad); return reinterpret_cast<const profiler::BaseBlockDescriptor*>(0xbad);
} }
PROFILER_API void endBlock() { } PROFILER_API void endBlock() { }

7
sample/BUILD Normal file
View File

@ -0,0 +1,7 @@
cc_binary(
name = "easy_profiler_sample",
srcs = ["main.cpp"],
deps = [
"//easy_profiler_core:easy_profiler",
],
)