diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 07dc81f3..4764192c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,10 +42,13 @@ add_library(popsift SHARED target_link_libraries(popsift PUBLIC CUDA::cudart - CUDA::nvToolsExt Threads::Threads) -# expected library to link was: "CUDA::nvtx3" but it appears to be simply nvToolsExt -# or maybe ${NVTX_LIBRARY} ??? + +if(PopSift_USE_NVTX_PROFILING) +target_link_libraries(popsift + PUBLIC + CUDA::nvtx3) +endif() # It is necessary to choose between shared and static, otherwise the CUDA_RUNTIME_LIBRARY target property # will not be set. diff --git a/src/application/CMakeLists.txt b/src/application/CMakeLists.txt index 0b6bdf20..2379c57d 100755 --- a/src/application/CMakeLists.txt +++ b/src/application/CMakeLists.txt @@ -60,10 +60,6 @@ else() set(PD_COMPILE_OPTIONS "" ) endif() -if(PopSift_USE_NVTX_PROFILING) - list(APPEND PD_LINK_LIBS ${CUDA_NVTX_LIBRARY}) -endif(PopSift_USE_NVTX_PROFILING) - ############################################################# # popsift-demo ############################################################# diff --git a/src/popsift/popsift.h b/src/popsift/popsift.h index 3b5f72b8..5654cc76 100755 --- a/src/popsift/popsift.h +++ b/src/popsift/popsift.h @@ -24,7 +24,7 @@ #include #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX) -#include +#include #else #define nvtxRangeStartA(a) #define nvtxRangeEnd(a) diff --git a/src/popsift/s_filtergrid.cu b/src/popsift/s_filtergrid.cu index a766c2de..bfe2e64e 100644 --- a/src/popsift/s_filtergrid.cu +++ b/src/popsift/s_filtergrid.cu @@ -10,7 +10,7 @@ #include "sift_pyramid.h" #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX) -#include +#include #else #define nvtxRangePushA(a) #define nvtxRangePop() diff --git a/src/popsift/s_image.cu b/src/popsift/s_image.cu index f26b8e3e..a966dd39 100755 --- a/src/popsift/s_image.cu +++ b/src/popsift/s_image.cu @@ -16,7 +16,7 @@ #include #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX) -#include +#include #else #define nvtxRangePushA(a) #define nvtxRangePop() diff --git a/src/popsift/s_orientation.cu b/src/popsift/s_orientation.cu index f6b36fcd..b34aaaa1 100644 --- a/src/popsift/s_orientation.cu +++ b/src/popsift/s_orientation.cu @@ -19,7 +19,7 @@ #include #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX) -#include +#include #else #define nvtxRangePushA(a) #define nvtxRangePop() diff --git a/src/popsift/sift_desc.cu b/src/popsift/sift_desc.cu index b0eb0bd1..f533df35 100644 --- a/src/popsift/sift_desc.cu +++ b/src/popsift/sift_desc.cu @@ -22,7 +22,7 @@ #include #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX) -#include +#include #else #define nvtxRangePushA(a) #define nvtxRangePop() diff --git a/src/popsift/sift_pyramid.cu b/src/popsift/sift_pyramid.cu index 06060052..c03b0d61 100644 --- a/src/popsift/sift_pyramid.cu +++ b/src/popsift/sift_pyramid.cu @@ -26,7 +26,7 @@ #endif #if POPSIFT_IS_DEFINED(POPSIFT_USE_NVTX) -#include +#include #else #define nvtxRangePushA(a) #define nvtxRangePop()