thirdparty 폴더 내 easy_profiler 생성 후 안에 build폴더 install 폴더 생성
easy_profiler 폴더 안에 다음 zip파일 풀기
build 폴더에서 make 실행
cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=../install ../easy_profiler-2.1.0
make -j3
sudo make install
find_package(easy_profiler REQUIRED HINTS ${CMAKE_SOURCE_DIR}/Thirdparty/easy_profiler/install/lib/cmake/easy_profiler)
if(${easy_profiler_FOUND})
message(STATUS "Found: Easy-profiler - ${easy_profiler_DIR}")
endif(${easy_profiler_FOUND})
set(EASY_PROFILER_LIBS easy_profiler)
set(BUILD_WITH_EASY_PROFILER true)
////////////////////////////////////////////////////
include_directories에
${CMAKE_SOURCE_DIR}/thirdparty/easy_profiler/install/Release/include
추가
target_link_library에
easy_profiler
추가
url: https://github.com/s2lam/vslam_project/tree/easyprofiler
#include “easy/profiler.h”
# define EASY_PROFILER_ENABLE ::profiler::setEnabled(true);
void function() {
EASY_BLOCK("블록이름", profiler::colors::Blue)
...
EASY_END_BLOCK
return val
}
profiler::dumpBlocksToFile("omp_profile06_4.prof");