1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-12 11:12:16 +00:00
ton/memprof/CMakeLists.txt

23 lines
739 B
Text
Raw Permalink Normal View History

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2019-09-07 10:03:22 +00:00
set(MEMPROF_SOURCE
memprof/memprof.cpp
memprof/memprof.h
)
# memprof - simple library for memory usage profiling
add_library(memprof STATIC ${MEMPROF_SOURCE})
target_include_directories(memprof PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(memprof PRIVATE tdutils)
if (MEMPROF)
target_compile_definitions(memprof PRIVATE -DUSE_MEMPROF=1)
if (MEMPROF STREQUAL "SAFE")
target_compile_definitions(memprof PRIVATE -DUSE_MEMPROF_SAFE=1)
elseif (MEMPROF STREQUAL "FAST")
target_compile_definitions(memprof PRIVATE -DUSE_MEMPROF_FAST=1)
elseif (NOT MEMPROF)
message(FATAL_ERROR "Unsupported MEMPROF value \"${MEMPROF}\"")
endif()
endif()