From 434622e2828cd6321e5e4c986020467691616c6a Mon Sep 17 00:00:00 2001 From: Sergey Yagovtsev Date: Wed, 17 Feb 2016 23:24:35 +0300 Subject: [PATCH] Linux build --- .gitignore | 1 + CMakeLists.txt | 4 ++++ include/profiler/profiler.h | 2 +- src/block.cpp | 2 +- 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c745919..a054091 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ bin build +.idea diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b191a6..3fadc6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,5 +14,9 @@ include_directories( include ) +if(UNIX) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +endif(UNIX) + add_subdirectory(src) add_subdirectory(sample) diff --git a/include/profiler/profiler.h b/include/profiler/profiler.h index 6bc88ab..e6650d0 100644 --- a/include/profiler/profiler.h +++ b/include/profiler/profiler.h @@ -49,7 +49,7 @@ along with this program.If not, see . #define PROFILER_DISABLE profiler::setEnabled(false); #include - +#include #ifdef _WIN32 #ifdef _BUILD_PROFILER diff --git a/src/block.cpp b/src/block.cpp index 05646f1..e321eec 100644 --- a/src/block.cpp +++ b/src/block.cpp @@ -21,7 +21,7 @@ name(_name), type(0) { tick(begin); - thread_id = std::this_thread::get_id().hash(); + thread_id = std::hash()(std::this_thread::get_id()); } void Mark::tick(timestamp_t& stamp)