mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-28 18:04:51 +00:00
Add option to launch volk_gnssssdr_profile after build
This commit is contained in:
parent
0ddea14c57
commit
d92b3598d7
@ -46,6 +46,7 @@ option(ENABLE_GPERFTOOLS "Enable linking to Gperftools libraries (tcmalloc and p
|
||||
option(ENABLE_GPROF "Enable the use of the GNU profiler tool 'gprof'" OFF)
|
||||
|
||||
# Acceleration
|
||||
option(ENABLE_PROFILING "Enable execution of volk_gnsssdr_profile at the end of the building" OFF)
|
||||
option(ENABLE_OPENCL "Enable building of processing blocks implemented with OpenCL (experimental)" OFF)
|
||||
option(ENABLE_CUDA "Enable building of processing blocks implemented with CUDA (experimental, requires CUDA SDK)" OFF)
|
||||
|
||||
@ -427,6 +428,7 @@ if(NOT VOLK_GNSSSDR_FOUND)
|
||||
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
||||
-DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/volk_gnsssdr_module/install
|
||||
-DENABLE_STATIC_LIBS=ON
|
||||
-DENABLE_PROFILING=${ENABLE_PROFILING}
|
||||
-DCMAKE_CXX_FLAGS=${CXX_FLAGS}
|
||||
-DCMAKE_C_FLAGS=${C_FLAGS}
|
||||
${STRIP_VOLK_GNSSSDR_PROFILE}
|
||||
|
@ -265,8 +265,9 @@ message(STATUS " Modify using: -DENABLE_TESTING=ON/OFF")
|
||||
# Option to enable post-build profiling using volk_profile, off by default
|
||||
########################################################################
|
||||
OPTION(ENABLE_PROFILING "Launch system profiler after build" OFF)
|
||||
if(ENABLE_PROFILING)
|
||||
if(DEFINED VOLK_CONFIGPATH)
|
||||
if(ENABLE_STATIC_LIBS)
|
||||
set(ENABLE_STATIC_LIBS ON)
|
||||
if(DEFINED VOLK_CONFIGPATH)
|
||||
get_filename_component(VOLK_CONFIGPATH ${VOLK_CONFIGPATH} ABSOLUTE)
|
||||
set(VOLK_CONFIGPATH "${VOLK_CONFIGPATH}/volk_gnsssdr")
|
||||
message(STATUS "System profiling is enabled, using path: ${VOLK_CONFIGPATH}")
|
||||
|
@ -81,23 +81,22 @@ if(ENABLE_PROFILING)
|
||||
set( VOLK_CONFIG_ARG "-p${VOLK_CONFIGPATH}" )
|
||||
set( VOLK_CONFIG "${VOLK_CONFIGPATH}/volk_gnsssdr_config" )
|
||||
endif()
|
||||
message("++++++++++++++ ${VOLK_CONFIG}")
|
||||
add_custom_command(OUTPUT ${VOLK_CONFIG}
|
||||
COMMAND volk_gnsssdr_profile "${VOLK_CONFIG_ARG}"
|
||||
DEPENDS volk_gnsssdr_profile
|
||||
COMMENT "Launching profiler, this may take a few minutes..."
|
||||
)
|
||||
add_custom_target(volk-gnsssdr-profile-run ALL DEPENDS ${VOLK_CONFIG})
|
||||
# target_link_libraries(volk-gnsssdr-profile-run volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
|
||||
endif()
|
||||
|
||||
# MAKE volk_gnsssdr-config-info
|
||||
add_executable(volk_gnsssdr-config-info volk_gnsssdr-config-info.cc)
|
||||
target_link_libraries(volk_gnsssdr-config-info volk_gnsssdr ${Boost_LIBRARIES} ${Clang_required_link} ${orc_lib})
|
||||
add_dependencies(volk_gnsssdr-config-info volk_gnsssdr)
|
||||
#install(
|
||||
|
||||
# install(
|
||||
# TARGETS volk_gnsssdr-config-info
|
||||
# DESTINATION bin
|
||||
# COMPONENT "volk_gnsssdr"
|
||||
#)
|
||||
# )
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user