mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-24 10:10:18 -06:00
Merge pull request #4798 from akva2/tracy_option
added: build system option to enable Tracy profiler
This commit is contained in:
commit
207e57804d
@ -32,6 +32,7 @@ option(USE_CHOW_PATEL_ILU_GPU_PARALLEL "Try to use more parallelism on the GPU d
|
||||
option(BUILD_FLOW_ALU_GRID "Build flow blackoil with alu grid" OFF)
|
||||
option(USE_DAMARIS_LIB "Use the Damaris library for asynchronous I/O?" OFF)
|
||||
option(USE_BDA_BRIDGE "Enable the BDA bridge (GPU/AMGCL solvers)" ON)
|
||||
option(USE_TRACY_PROFILER "Enable tracy profiling" OFF)
|
||||
|
||||
# The following was copied from CMakeLists.txt in opm-common.
|
||||
# TODO: factor out the common parts in opm-common and opm-simulator as a cmake module
|
||||
@ -258,6 +259,12 @@ macro (config_hook)
|
||||
add_definitions(-DFMT_HEADER_ONLY)
|
||||
list(APPEND EXTRA_INCLUDES SYSTEM ${PROJECT_SOURCE_DIR}/external/fmtlib/include)
|
||||
endif()
|
||||
if(USE_TRACY_PROFILER AND Tracy_FOUND)
|
||||
set(USE_TRACY 1)
|
||||
list(APPEND opm-simulators_LIBRARIES Tracy::TracyClient)
|
||||
else()
|
||||
set(USE_TRACY)
|
||||
endif()
|
||||
include_directories(${EXTRA_INCLUDES})
|
||||
|
||||
include(UseDamaris)
|
||||
|
@ -22,6 +22,7 @@ set (opm-simulators_CONFIG_VAR
|
||||
HAVE_SUITESPARSE_UMFPACK
|
||||
HAVE_DAMARIS
|
||||
HAVE_HDF5
|
||||
USE_TRACY
|
||||
)
|
||||
|
||||
# dependencies
|
||||
@ -54,6 +55,7 @@ set (opm-simulators_DEPS
|
||||
"opm-models REQUIRED"
|
||||
"Damaris 1.7"
|
||||
"HDF5"
|
||||
"Tracy"
|
||||
)
|
||||
|
||||
find_package_deps(opm-simulators)
|
||||
|
Loading…
Reference in New Issue
Block a user