0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-26 16:11:02 +08:00
easy_profiler/sample/CMakeLists.txt
Holger Rapp 7641951247 Fixes for clang 3.8.
- Disables warnings for no-braced-scalar-init which shows up for ATOMIC_VAR_INIT.
- Fixes compile warnings, mostly "moving a temporary objects prevents
  copy elision" (-Wpessimizing-move) and unused variables.
- Adds some necessary fields to make the sample compile after having
  build the core library.
2017-02-07 17:19:58 +01:00

34 lines
716 B
CMake

project(profiler_sample)
cmake_minimum_required(VERSION 2.8)
set(CPP_FILES
main.cpp
)
set(SOURCES
${CPP_FILES}
)
include_directories(
../easy_profiler_core/include
)
link_directories(${CMAKE_SOURCE_DIR}/../bin)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11")
add_executable(${PROJECT_NAME} ${SOURCES})
set(DISABLED_PROFILER_NAME
"${PROJECT_NAME}_disabled_profiler"
)
add_executable(${DISABLED_PROFILER_NAME} ${SOURCES})
if(UNIX)
set(SPEC_LIB pthread)
endif(UNIX)
target_link_libraries(${PROJECT_NAME} easy_profiler ${SPEC_LIB})
target_link_libraries(${DISABLED_PROFILER_NAME} easy_profiler ${SPEC_LIB})
target_compile_definitions(${PROJECT_NAME} PRIVATE BUILD_WITH_EASY_PROFILER)