f17ff12a66
* omnitrace namespace
* Kokkos + Lulesh example/tests
* Sampling support + more
- OMNITRACE_BUILD_TESTING option
- sampling support
- pthread_gotcha
- fixes to labels for mpi_gotcha, fork_gotcha, omnitrace_component
- tasking::block_signals, tasking::unblock_signals
- instrumentation mode option in omnitrace exe
- argument option groups in omnitrace exe
- categories in omnitrace settings
- remove TIMEMORY_ prefixed options
* Release workflow updates
* Updated settings printing
* Fixed defaults in README
* Tweak setting defaults in README
* CMake fixes
* cmake-format
* clang-format
* LULESH_USE_MPI OFF
* LULESH_USE_MPI fix
* timemory add_secondary fix
* timemory ambiguous internal namespace fix
* Update timemory submodule
* Handle output path/prefix in omnitrace
- updated timemory
- updated test environment
* sampling + papi fix
* Fix to sampling without PAPI
* Fix for using too many processors in CI
* formatting
* Updated CI
- minor cmake tweaks
- updated timemory submodule
* Updated CI
* Updated CI
* CI + timemory updates
- data race fixes
* CI updates + debug for sampling
* Sampling updates
- moved tasking::{block,unblock}_signals to sampling namespace
- improvements to sampling w.r.t. thread-locality
* Minimum OMNITRACE_THREAD_COUNT of 128
* Handle multiple dims in sampler data
* Configure libunwind support for timemory
* Improved safeguards for sampling
- updated CI
- lulesh runtime-instrument test tweak
* formatting
* CI updates + sampler updates + misc
- fixed stack-buffer-overflow in omnitrace (get_*file_line_info)
- test labels
- steady_clock instead of system_clock in sampler
- update dyninst submodule with upgradePlaceholder fix
- disable OMNITRACE_BUILD_TESTING by default
* Updated timemory submodule
- hidden visibility for timemory
- storage finalizers do not capture this
* Update timemory submodule
- component visibility updates
* Reworked header includes
- use <...> for timemory headers
- always include <library/defines.hpp>
* Rename some config options
* Update PTL submodule
* Update kokkos submodule
* Updated sampling
* Updated CI
* Reworked instrumentation exe
- lowered min-address-range threshold to 256
- extended whole function exclude
* CI fix + timemory submodule update
- TIMEMORY_VISIBLE on component base
- RelWithDebugInfo -> RelWithDebInfo
- Info output for parallel-overhead
* Sampling flags + transpose update + CI update
- disable critical trace for parallel-overhead in CI
- SA_RESTART only in sampler
- reworked transpose example to use fewer threads
* CI update
- removed ubuntu-focal-external-debug
- reduced data artifacts upload
* CI timeouts
- updated timemory submodule
- minor tweaks to omnitrace exe logging
* LICENSE updates (partial)
* CI Test stage timeout extension
* Docker and Packaging updates
* Miscellaneous fixes/tweaks
- gpu.hpp / gpu.cpp
- disable roctracer component if no devices
- re-enable InstrStackFrames by default
- disable sampling by default
- pthread_gotcha::m_enable_sampling is false by default
- timemory submodule update w/ sampler and pop(tid) updates
- fix minor bug in sampler logic
- CMake: OMNITRACE_USE_HIP option
- roctracer + timemory fix
* Replaced OMNITRACE_USE_ROCTRACER with OMNITRACE_USE_HIP where appropriate
* cmake format
* Sampler deadlock fixes
* Removed debug messages from sampler
* Fix for MPI detection + test tweaks + misc
* Sampler deadlock fixes + misc
- removed papi_tot_ins
- pthread_gotcha blocks signals globally until sampler is setup
- metadata specialization for sampling components
- OMNITRACE_INSTRUMENTATION_MODE -> OMNITRACE_MODE
- default sampling delay increased to 0.05 from 1.0e-6
- removed {block,unblock}_signals from critical_trace and ptl
- no longer necessary to use
- sampling delay minimum is 1.0e-3
- OMNITRACE_BUILD_HIDDEN_VISIBILITY
* omnitrace-avail + libunwind update + restructure
- restructured omnitrace components
- build custom omnitrace-avail executable
- updated libunwind to avoid malloc in get_unw_backtrace
* Fix remaining reorganization issues
- removed some duplicate code
- fixed some trait specializations after implicit instatiation
- formatting
* ensure_storage fix + avail improvements
- fix ensure_storage when component not avail
- suppress irrelevant info in omnitrace-avail
* Delay settings initialization
- slight tweak to tests w/ MPI
* Disable OpenMPI testing w/ ubuntu-bionic
- MPI testing is hanging bc of network interface issue on system:
> [[20462,1],0]: A high-performance Open MPI point-to-point messaging module
> was unable to find any relevant network interfaces:
> Module: OpenFabrics (openib)
> Host: fv-az19-371
> Another transport will be used instead, although this may result in
> lower performance.
> NOTE: You can disable this warning by setting the MCA parameter
> btl_base_warn_component_unused to 0.
[ROCm/rocprofiler-systems commit: 778af2a760]
426 lines
15 KiB
CMake
426 lines
15 KiB
CMake
# include guard
|
|
include_guard(DIRECTORY)
|
|
|
|
# ########################################################################################
|
|
#
|
|
# External Packages are found here
|
|
#
|
|
# ########################################################################################
|
|
|
|
omnitrace_add_interface_library(
|
|
omnitrace-headers "Provides minimal set of include flags to compile with omnitrace")
|
|
omnitrace_add_interface_library(omnitrace-threading "Enables multithreading support")
|
|
omnitrace_add_interface_library(
|
|
omnitrace-dyninst
|
|
"Provides flags and libraries for Dyninst (dynamic instrumentation)")
|
|
omnitrace_add_interface_library(omnitrace-hip "Provides flags and libraries for HIP")
|
|
omnitrace_add_interface_library(omnitrace-roctracer
|
|
"Provides flags and libraries for roctracer")
|
|
omnitrace_add_interface_library(omnitrace-mpi "Provides MPI or MPI headers")
|
|
omnitrace_add_interface_library(omnitrace-ptl "Enables PTL support (tasking)")
|
|
|
|
target_include_directories(omnitrace-headers INTERFACE ${PROJECT_SOURCE_DIR}/include
|
|
${PROJECT_BINARY_DIR}/include)
|
|
|
|
# include threading because of rooflines
|
|
target_link_libraries(omnitrace-headers INTERFACE omnitrace-threading)
|
|
|
|
# ensure the env overrides the appending /opt/rocm later
|
|
string(REPLACE ":" ";" CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH};${CMAKE_PREFIX_PATH}")
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# Threading
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
if(NOT WIN32)
|
|
set(CMAKE_THREAD_PREFER_PTHREAD ON)
|
|
set(THREADS_PREFER_PTHREAD_FLAG OFF)
|
|
endif()
|
|
|
|
find_library(pthread_LIBRARY NAMES pthread pthreads)
|
|
find_package_handle_standard_args(pthread-library REQUIRED_VARS pthread_LIBRARY)
|
|
find_package(Threads ${omnitrace_FIND_QUIETLY} ${omnitrace_FIND_REQUIREMENT})
|
|
|
|
if(Threads_FOUND)
|
|
target_link_libraries(omnitrace-threading INTERFACE ${CMAKE_THREAD_LIBS_INIT})
|
|
endif()
|
|
|
|
if(pthread_LIBRARY AND NOT WIN32)
|
|
target_link_libraries(omnitrace-threading INTERFACE ${pthread_LIBRARY})
|
|
endif()
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# HIP
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
if(OMNITRACE_USE_HIP)
|
|
list(APPEND CMAKE_PREFIX_PATH /opt/rocm)
|
|
find_package(hip ${omnitrace_FIND_QUIETLY} REQUIRED)
|
|
target_compile_definitions(omnitrace-hip INTERFACE OMNITRACE_USE_HIP)
|
|
target_link_libraries(omnitrace-hip INTERFACE hip::host)
|
|
endif()
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# roctracer
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
if(OMNITRACE_USE_ROCTRACER)
|
|
list(APPEND CMAKE_PREFIX_PATH /opt/rocm)
|
|
find_package(roctracer ${omnitrace_FIND_QUIETLY} REQUIRED)
|
|
target_compile_definitions(omnitrace-roctracer INTERFACE OMNITRACE_USE_ROCTRACER)
|
|
target_link_libraries(omnitrace-roctracer INTERFACE roctracer::roctracer
|
|
omnitrace::omnitrace-hip)
|
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${roctracer_LIBRARY_DIRS}")
|
|
endif()
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# MPI
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
if(OMNITRACE_USE_MPI)
|
|
find_package(MPI ${omnitrace_FIND_QUIETLY} REQUIRED)
|
|
target_link_libraries(omnitrace-mpi INTERFACE MPI::MPI_C MPI::MPI_CXX)
|
|
elseif(OMNITRACE_USE_MPI_HEADERS)
|
|
find_package(MPI-Headers ${omnitrace_FIND_QUIETLY} REQUIRED)
|
|
target_compile_definitions(omnitrace-mpi INTERFACE TIMEMORY_USE_MPI_HEADERS
|
|
OMNITRACE_USE_MPI_HEADERS)
|
|
target_link_libraries(omnitrace-mpi INTERFACE MPI::MPI_HEADERS)
|
|
endif()
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# Dyninst
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
if(OMNITRACE_BUILD_DYNINST)
|
|
omnitrace_checkout_git_submodule(
|
|
RELATIVE_PATH external/dyninst
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
REPO_URL https://github.com/jrmadsen/dyninst.git
|
|
REPO_BRANCH formatting)
|
|
|
|
set(DYNINST_OPTION_PREFIX ON)
|
|
set(DYNINST_BUILD_DOCS OFF)
|
|
set(DYNINST_QUIET_CONFIG
|
|
ON
|
|
CACHE BOOL "Suppress dyninst cmake messages")
|
|
set(DYNINST_BUILD_PARSE_THAT
|
|
OFF
|
|
CACHE BOOL "Build dyninst parseThat executable")
|
|
set(DYNINST_BUILD_SHARED_LIBS
|
|
ON
|
|
CACHE BOOL "Build shared dyninst libraries")
|
|
set(DYNINST_BUILD_STATIC_LIBS
|
|
OFF
|
|
CACHE BOOL "Build static dyninst libraries")
|
|
set(DYNINST_ENABLE_LTO
|
|
OFF
|
|
CACHE BOOL "Enable LTO for dyninst libraries")
|
|
|
|
omnitrace_save_variables(PIC VARIABLES CMAKE_POSITION_INDEPENDENT_CODE)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
add_subdirectory(external/dyninst)
|
|
omnitrace_restore_variables(PIC VARIABLES CMAKE_POSITION_INDEPENDENT_CODE)
|
|
|
|
add_library(Dyninst::Dyninst INTERFACE IMPORTED)
|
|
foreach(_LIB common dyninstAPI parseAPI instructionAPI symtabAPI stackwalk Boost TBB)
|
|
target_link_libraries(Dyninst::Dyninst INTERFACE Dyninst::${_LIB})
|
|
endforeach()
|
|
|
|
target_link_libraries(omnitrace-dyninst INTERFACE Dyninst::Dyninst)
|
|
|
|
set(OMNITRACE_DYNINST_API_RT
|
|
${PROJECT_BINARY_DIR}/external/dyninst/dyninstAPI_RT/libdyninstAPI_RT${CMAKE_SHARED_LIBRARY_SUFFIX}
|
|
)
|
|
|
|
if(OMNITRACE_DYNINST_API_RT)
|
|
target_compile_definitions(
|
|
omnitrace-dyninst
|
|
INTERFACE
|
|
DYNINST_API_RT="${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}:$<TARGET_FILE_DIR:Dyninst::dyninstAPI_RT>:${CMAKE_INSTALL_PREFIX}/lib/$<TARGET_FILE_NAME:Dyninst::dyninstAPI_RT>:$<TARGET_FILE:Dyninst::dyninstAPI_RT>"
|
|
)
|
|
endif()
|
|
|
|
else()
|
|
find_package(Dyninst ${omnitrace_FIND_QUIETLY} REQUIRED
|
|
COMPONENTS dyninstAPI parseAPI instructionAPI symtabAPI)
|
|
|
|
if(TARGET Dyninst::Dyninst) # updated Dyninst CMake system was found
|
|
# useful for defining the location of the runtime API
|
|
find_library(
|
|
OMNITRACE_DYNINST_API_RT dyninstAPI_RT
|
|
HINTS ${Dyninst_ROOT_DIR} ${Dyninst_DIR}
|
|
PATHS ${Dyninst_ROOT_DIR} ${Dyninst_DIR}
|
|
PATH_SUFFIXES lib)
|
|
|
|
if(OMNITRACE_DYNINST_API_RT)
|
|
target_compile_definitions(
|
|
omnitrace-dyninst INTERFACE DYNINST_API_RT="${OMNITRACE_DYNINST_API_RT}")
|
|
endif()
|
|
|
|
omnitrace_add_rpath(${Dyninst_LIBRARIES})
|
|
target_link_libraries(omnitrace-dyninst INTERFACE Dyninst::Dyninst)
|
|
else() # updated Dyninst CMake system was not found
|
|
set(_BOOST_COMPONENTS atomic system thread date_time)
|
|
set(omnitrace_BOOST_COMPONENTS
|
|
"${_BOOST_COMPONENTS}"
|
|
CACHE STRING "Boost components used by Dyninst in omnitrace")
|
|
set(Boost_NO_BOOST_CMAKE ON)
|
|
find_package(Boost QUIET REQUIRED COMPONENTS ${omnitrace_BOOST_COMPONENTS})
|
|
|
|
# some installs of dyninst don't set this properly
|
|
if(EXISTS "${DYNINST_INCLUDE_DIR}" AND NOT DYNINST_HEADER_DIR)
|
|
get_filename_component(DYNINST_HEADER_DIR "${DYNINST_INCLUDE_DIR}" REALPATH
|
|
CACHE)
|
|
else()
|
|
find_path(
|
|
DYNINST_HEADER_DIR
|
|
NAMES BPatch.h dyninstAPI_RT.h
|
|
HINTS ${Dyninst_ROOT_DIR} ${Dyninst_DIR} ${Dyninst_DIR}/../../..
|
|
PATHS ${Dyninst_ROOT_DIR} ${Dyninst_DIR} ${Dyninst_DIR}/../../..
|
|
PATH_SUFFIXES include)
|
|
endif()
|
|
|
|
# useful for defining the location of the runtime API
|
|
find_library(
|
|
OMNITRACE_DYNINST_API_RT dyninstAPI_RT
|
|
HINTS ${Dyninst_ROOT_DIR} ${Dyninst_DIR}
|
|
PATHS ${Dyninst_ROOT_DIR} ${Dyninst_DIR}
|
|
PATH_SUFFIXES lib)
|
|
|
|
# try to find TBB
|
|
find_package(TBB QUIET)
|
|
|
|
# if fail try to use the Dyninst installed FindTBB.cmake
|
|
if(NOT TBB_FOUND)
|
|
list(APPEND CMAKE_MODULE_PATH ${Dyninst_DIR}/Modules)
|
|
find_package(TBB QUIET)
|
|
endif()
|
|
|
|
if(NOT TBB_FOUND)
|
|
find_path(
|
|
TBB_INCLUDE_DIR
|
|
NAMES tbb/tbb.h
|
|
PATH_SUFFIXES include)
|
|
endif()
|
|
|
|
if(OMNITRACE_DYNINST_API_RT)
|
|
target_compile_definitions(
|
|
omnitrace-dyninst INTERFACE DYNINST_API_RT="${OMNITRACE_DYNINST_API_RT}")
|
|
endif()
|
|
|
|
if(Boost_DIR)
|
|
get_filename_component(Boost_RPATH_DIR "${Boost_DIR}" DIRECTORY)
|
|
get_filename_component(Boost_RPATH_DIR "${Boost_RPATH_DIR}" DIRECTORY)
|
|
if(EXISTS "${Boost_RPATH_DIR}" AND IS_DIRECTORY "${Boost_RPATH_DIR}")
|
|
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:${Boost_RPATH_DIR}")
|
|
endif()
|
|
endif()
|
|
|
|
omnitrace_add_rpath(${DYNINST_LIBRARIES} ${Boost_LIBRARIES})
|
|
target_link_libraries(omnitrace-dyninst INTERFACE ${DYNINST_LIBRARIES}
|
|
${Boost_LIBRARIES})
|
|
foreach(
|
|
_TARG
|
|
dyninst
|
|
dyninstAPI
|
|
instructionAPI
|
|
symtabAPI
|
|
parseAPI
|
|
headers
|
|
atomic
|
|
system
|
|
thread
|
|
date_time
|
|
TBB)
|
|
if(TARGET Dyninst::${_TARG})
|
|
target_link_libraries(omnitrace-dyninst INTERFACE Dyninst::${_TARG})
|
|
elseif(TARGET Boost::${_TARG})
|
|
target_link_libraries(omnitrace-dyninst INTERFACE Boost::${_TARG})
|
|
elseif(TARGET ${_TARG})
|
|
target_link_libraries(omnitrace-dyninst INTERFACE ${_TARG})
|
|
endif()
|
|
endforeach()
|
|
target_include_directories(
|
|
omnitrace-dyninst SYSTEM INTERFACE ${TBB_INCLUDE_DIR} ${Boost_INCLUDE_DIRS}
|
|
${DYNINST_HEADER_DIR})
|
|
target_compile_definitions(omnitrace-dyninst INTERFACE omnitrace_USE_DYNINST)
|
|
endif()
|
|
endif()
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# Perfetto
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
set(perfetto_DIR ${PROJECT_SOURCE_DIR}/external/perfetto)
|
|
omnitrace_checkout_git_submodule(
|
|
RELATIVE_PATH external/perfetto
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
REPO_URL https://android.googlesource.com/platform/external/perfetto
|
|
REPO_BRANCH v17.0
|
|
TEST_FILE sdk/perfetto.cc)
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# ELFIO
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
if(OMNITRACE_BUILD_DEVICETRACE)
|
|
omnitrace_checkout_git_submodule(
|
|
RELATIVE_PATH external/elfio
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
REPO_URL https://github.com/jrmadsen/ELFIO.git
|
|
REPO_BRANCH set-offset-support)
|
|
|
|
add_subdirectory(external/elfio)
|
|
endif()
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# timemory submodule
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
set(TIMEMORY_INSTALL_HEADERS
|
|
OFF
|
|
CACHE BOOL "Disable timemory header install")
|
|
set(TIMEMORY_INSTALL_CONFIG
|
|
OFF
|
|
CACHE BOOL "Disable timemory cmake configuration install")
|
|
set(TIMEMORY_INSTALL_ALL
|
|
OFF
|
|
CACHE BOOL "Disable install target depending on all target")
|
|
set(TIMEMORY_BUILD_C
|
|
OFF
|
|
CACHE BOOL "Disable timemory C library")
|
|
set(TIMEMORY_BUILD_FORTRAN
|
|
OFF
|
|
CACHE BOOL "Disable timemory Fortran library")
|
|
set(TIMEMORY_BUILD_TOOLS
|
|
OFF
|
|
CACHE BOOL "Ensure timem executable is built")
|
|
set(TIMEMORY_BUILD_EXCLUDE_FROM_ALL
|
|
ON
|
|
CACHE BOOL "Set timemory to only build dependencies")
|
|
set(TIMEMORY_BUILD_HIDDEN_VISIBILITY
|
|
ON
|
|
CACHE BOOL "Build timemory with hidden visibility")
|
|
set(TIMEMORY_QUIET_CONFIG
|
|
ON
|
|
CACHE BOOL "Make timemory configuration quieter")
|
|
|
|
# timemory feature settings
|
|
set(TIMEMORY_USE_MPI
|
|
${OMNITRACE_USE_MPI}
|
|
CACHE BOOL "Enable MPI support in timemory" FORCE)
|
|
set(TIMEMORY_USE_GOTCHA
|
|
ON
|
|
CACHE BOOL "Enable GOTCHA support in timemory")
|
|
set(TIMEMORY_USE_PERFETTO
|
|
OFF
|
|
CACHE BOOL "Disable perfetto support in timemory")
|
|
set(TIMEMORY_USE_LIBUNWIND
|
|
ON
|
|
CACHE BOOL "Enable libunwind support in timemory")
|
|
|
|
# timemory feature build settings
|
|
set(TIMEMORY_BUILD_GOTCHA
|
|
ON
|
|
CACHE BOOL "Enable building GOTCHA library from submodule")
|
|
set(TIMEMORY_BUILD_LIBUNWIND
|
|
ON
|
|
CACHE BOOL "Enable building libunwind library from submodule")
|
|
set(TIMEMORY_BUILD_EXTRA_OPTIMIZATIONS
|
|
${OMNITRACE_BUILD_EXTRA_OPTIMIZATIONS}
|
|
CACHE BOOL "Enable building GOTCHA library from submodule" FORCE)
|
|
|
|
# timemory build settings
|
|
set(TIMEMORY_TLS_MODEL
|
|
"global-dynamic"
|
|
CACHE STRING "Thread-local static model" FORCE)
|
|
|
|
set(TIMEMORY_SETTINGS_PREFIX
|
|
"OMNITRACE_"
|
|
CACHE STRING "Prefix used for settings and environment variables")
|
|
mark_as_advanced(TIMEMORY_SETTINGS_PREFIX)
|
|
|
|
omnitrace_checkout_git_submodule(
|
|
RELATIVE_PATH external/timemory
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
REPO_URL https://github.com/NERSC/timemory.git
|
|
REPO_BRANCH gpu-kernel-instrumentation)
|
|
|
|
omnitrace_save_variables(
|
|
BUILD_CONFIG VARIABLES BUILD_SHARED_LIBS BUILD_STATIC_LIBS
|
|
CMAKE_POSITION_INDEPENDENT_CODE CMAKE_PREFIX_PATH)
|
|
|
|
# ensure timemory builds PIC static libs so that we don't have to install timemory shared
|
|
# lib
|
|
set(BUILD_SHARED_LIBS ON)
|
|
set(BUILD_STATIC_LIBS OFF)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
set(TIMEMORY_CTP_OPTIONS GLOBAL)
|
|
|
|
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
# results in undefined symbols to component::base<T>::load()
|
|
set(TIMEMORY_BUILD_HIDDEN_VISIBILITY
|
|
OFF
|
|
CACHE BOOL "" FORCE)
|
|
endif()
|
|
|
|
add_subdirectory(external/timemory)
|
|
|
|
omnitrace_restore_variables(
|
|
BUILD_CONFIG VARIABLES BUILD_SHARED_LIBS BUILD_STATIC_LIBS
|
|
CMAKE_POSITION_INDEPENDENT_CODE CMAKE_PREFIX_PATH)
|
|
|
|
# ----------------------------------------------------------------------------------------#
|
|
#
|
|
# PTL (Parallel Tasking Library) submodule
|
|
#
|
|
# ----------------------------------------------------------------------------------------#
|
|
|
|
# timemory might provide PTL::ptl-shared
|
|
if(NOT TARGET PTL::ptl-shared)
|
|
omnitrace_checkout_git_submodule(
|
|
RELATIVE_PATH external/PTL
|
|
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
|
|
REPO_URL https://github.com/jrmadsen/PTL.git
|
|
REPO_BRANCH master)
|
|
|
|
set(PTL_BUILD_EXAMPLES OFF)
|
|
set(PTL_USE_TBB OFF)
|
|
set(PTL_USE_GPU OFF)
|
|
set(PTL_DEVELOPER_INSTALL OFF)
|
|
|
|
omnitrace_save_variables(
|
|
BUILD_CONFIG
|
|
VARIABLES BUILD_SHARED_LIBS BUILD_STATIC_LIBS CMAKE_POSITION_INDEPENDENT_CODE
|
|
CMAKE_CXX_VISIBILITY_PRESET CMAKE_VISIBILITY_INLINES_HIDDEN)
|
|
|
|
set(BUILD_SHARED_LIBS ON)
|
|
set(BUILD_STATIC_LIBS OFF)
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
|
|
|
add_subdirectory(external/PTL)
|
|
omnitrace_restore_variables(
|
|
BUILD_CONFIG
|
|
VARIABLES BUILD_SHARED_LIBS BUILD_STATIC_LIBS CMAKE_POSITION_INDEPENDENT_CODE
|
|
CMAKE_CXX_VISIBILITY_PRESET CMAKE_VISIBILITY_INLINES_HIDDEN)
|
|
endif()
|
|
|
|
target_link_libraries(omnitrace-ptl INTERFACE PTL::ptl-shared)
|