From d338c022fbff003abcbdefbdc0bc17a1f3b3046d Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Tue, 7 Feb 2017 06:22:34 +0300 Subject: [PATCH] v1.0.2 --- README.md | 38 +++++++++++++++++++++++++++------ easy_profiler_core/reader.cpp | 1 + easy_profiler_core/version.info | 2 +- 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 565a840..e593a09 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# easy_profiler [![version](https://img.shields.io/badge/version-1.0.1-009688.svg)](https://github.com/yse/easy_profiler/releases) +# easy_profiler [![version](https://img.shields.io/badge/version-1.0.2-009688.svg)](https://github.com/yse/easy_profiler/releases) [![Build Status](https://travis-ci.org/yse/easy_profiler.svg?branch=develop)](https://travis-ci.org/yse/easy_profiler) @@ -7,6 +7,9 @@ 1. [About](#about) 2. [Usage](#usage) + - [Prepare build system](#prepare-build-system) + - [General build system](#general) + - [CMake](#build-with-cmake) - [Add profiling blocks](#add-profiling-blocks) - [Collect blocks](#collect-blocks) 3. [Build](#build) @@ -35,11 +38,38 @@ You can see the results of measuring in simple GUI application which provides fu # Usage -## Add profiling blocks +## Prepare build system + +### General First of all you can specify path to include directory which contains `include/profiler` directory and define macro `BUILD_WITH_EASY_PROFILER`. For linking with easy_profiler you can specify path to library. +### Build with cmake + +If you are using `cmake` set `CMAKE_PREFIX_PATH` to `cmake/easy_profiler` directory (from [release](https://github.com/yse/easy_profiler/releases) package) and use function `find_package(easy_profiler)` with `target_link_libraries(... easy_profiler)`. Don't forget to define macro `BUILD_WITH_EASY_PROFILER`. Example: + +``` cmake +project(app_for_profiling) + +set(SOURCES + main.cpp +) + +#CMAKE_PREFIX_PATH should be set to /cmake/easy_profiler +find_package(easy_profiler REQUIRED) + +add_definitions( +-DBUILD_WITH_EASY_PROFILER +) + +add_executable(app_for_profiling ${SOURCES}) + +target_link_libraries(app_for_profiling easy_profiler) +``` + +## Add profiling blocks + Example of usage. This code snippet will generate block with function name and Magenta color: @@ -135,7 +165,3 @@ $ mkdir build $ cd build $ cmake .. -G "Visual Studio 12 2013 Win64" ``` - - - -[![Analytics](https://ga-beacon.appspot.com/UA-82899176-1/easy_profiler/readme)](https://github.com/yse/easy_profiler) diff --git a/easy_profiler_core/reader.cpp b/easy_profiler_core/reader.cpp index 31e0d7d..9de296b 100644 --- a/easy_profiler_core/reader.cpp +++ b/easy_profiler_core/reader.cpp @@ -75,6 +75,7 @@ extern const uint32_t EASY_CURRENT_VERSION; # define EASY_VERSION_INT(v_major, v_minor, v_patch) ((static_cast(v_major) << 24) | (static_cast(v_minor) << 16) | static_cast(v_patch)) const uint32_t EASY_V_100 = EASY_VERSION_INT(1, 0, 0); const uint32_t COMPATIBLE_VERSIONS[] = { + EASY_VERSION_INT(1, 0, 1), EASY_V_100, EASY_VERSION_INT(0, 1, 0) }; diff --git a/easy_profiler_core/version.info b/easy_profiler_core/version.info index 7f20734..e6d5cb8 100644 --- a/easy_profiler_core/version.info +++ b/easy_profiler_core/version.info @@ -1 +1 @@ -1.0.1 \ No newline at end of file +1.0.2 \ No newline at end of file