diff options
author | Mikhail Kurinnoi <m.kurinnoi@samsung.com> | 2020-01-20 11:16:30 +0300 |
---|---|---|
committer | Alexander Soldatov/AI Compiler Lab /SRR/Staff Engineer/Samsung Electronics <soldatov.a@samsung.com> | 2020-01-29 14:12:55 +0300 |
commit | bb54367c39a4322e0eae2bdaf8ca367cabcad276 (patch) | |
tree | c826e0716c1acc869a0caad0475699c6004936d7 | |
parent | cf5b1da235869d17262b009a857b4290583127b7 (diff) | |
download | heaptrack-bb54367c39a4322e0eae2bdaf8ca367cabcad276.tar.gz heaptrack-bb54367c39a4322e0eae2bdaf8ca367cabcad276.tar.bz2 heaptrack-bb54367c39a4322e0eae2bdaf8ca367cabcad276.zip |
Remove heaptrack_preload build by default.
We use heaptrack_inject only, no reason build heaptrack_preload.
-rw-r--r-- | src/track/CMakeLists.txt | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/src/track/CMakeLists.txt b/src/track/CMakeLists.txt index 6dd29c5..0e92c5c 100644 --- a/src/track/CMakeLists.txt +++ b/src/track/CMakeLists.txt @@ -14,34 +14,36 @@ if (NOT TIZEN) ) endif() -# heaptrack_preload: track a newly started process -add_library(heaptrack_preload MODULE - heaptrack_preload.cpp - libheaptrack.cpp - outstream/outstream.cpp - outstream/outstream_file.cpp - outstream/outstream_socket.cpp -) +if (BUILD_PRELOAD) + # heaptrack_preload: track a newly started process + add_library(heaptrack_preload MODULE + heaptrack_preload.cpp + libheaptrack.cpp + outstream/outstream.cpp + outstream/outstream_file.cpp + outstream/outstream_socket.cpp + ) -target_compile_options(heaptrack_preload PRIVATE "-ftls-model=initial-exec") + target_compile_options(heaptrack_preload PRIVATE "-ftls-model=initial-exec") -target_link_libraries(heaptrack_preload LINK_PRIVATE - ${CMAKE_DL_LIBS} - ${CMAKE_THREAD_LIBS_INIT} - ${LIBUNWIND_LIBRARY} - rt - -ftls-model=initial-exec -) + target_link_libraries(heaptrack_preload LINK_PRIVATE + ${CMAKE_DL_LIBS} + ${CMAKE_THREAD_LIBS_INIT} + ${LIBUNWIND_LIBRARY} + rt + -ftls-model=initial-exec + ) -set_target_properties(heaptrack_preload PROPERTIES - VERSION ${HEAPTRACK_LIB_VERSION} - SOVERSION ${HEAPTRACK_LIB_SOVERSION} - LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${LIB_INSTALL_DIR}/heaptrack" -) + set_target_properties(heaptrack_preload PROPERTIES + VERSION ${HEAPTRACK_LIB_VERSION} + SOVERSION ${HEAPTRACK_LIB_SOVERSION} + LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${LIB_INSTALL_DIR}/heaptrack" + ) -install(TARGETS heaptrack_preload - LIBRARY DESTINATION ${LIB_INSTALL_DIR}/heaptrack/ -) + install(TARGETS heaptrack_preload + LIBRARY DESTINATION ${LIB_INSTALL_DIR}/heaptrack/ + ) +endif() # heaptrack_inject: track an already running process add_library(heaptrack_inject MODULE |