Commit 906a35f2 authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Removed ALREADY_MODIFIED_PATH variable in gpu sniffer link stanza, which I am...

Removed ALREADY_MODIFIED_PATH variable in gpu sniffer link stanza, which I am pretty sure would not have worked as desired.
parent f241d05b
...@@ -22,18 +22,13 @@ ...@@ -22,18 +22,13 @@
# get this gpu-sniffer to work, we need to set DYLD_LIBRARY_PATH here. # get this gpu-sniffer to work, we need to set DYLD_LIBRARY_PATH here.
get_filename_component(CUDART_DIR "${FOUND_CUDART}" PATH) get_filename_component(CUDART_DIR "${FOUND_CUDART}" PATH)
file(TO_NATIVE_PATH "${CUDART_DIR}" CUDART_NATIVE_DIR) file(TO_NATIVE_PATH "${CUDART_DIR}" CUDART_NATIVE_DIR)
set(ALREADY_MODIFIED_PATH FALSE CACHE BOOL "Whether link path has been modified for GPU sniffer") if(APPLE)
mark_as_advanced(ALREADY_MODIFIED_PATH) set(ENV{DYLD_LIBRARY_PATH} "$ENV{DYLD_LIBRARY_PATH}:${CUDART_NATIVE_DIR}")
if(NOT ALREADY_MODIFIED_PATH) elseif(UNIX)
if(APPLE) set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${CUDART_NATIVE_DIR}")
set(ENV{DYLD_LIBRARY_PATH} "$ENV{DYLD_LIBRARY_PATH}:${CUDART_NATIVE_DIR}") elseif(MSVC)
elseif(UNIX) set(ENV{PATH} "$ENV{PATH};${CUDART_NATIVE_DIR}")
set(ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${CUDART_NATIVE_DIR}") endif(APPLE)
elseif(MSVC)
set(ENV{PATH} "$ENV{PATH};${CUDART_NATIVE_DIR}")
endif(APPLE)
set(ALREADY_MODIFIED_PATH TRUE CACHE BOOL "Whether link path has been modified for GPU sniffer" FORCE)
endif(NOT ALREADY_MODIFIED_PATH)
try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR try_run(RUN_RESULT_VAR COMPILE_RESULT_VAR
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/tests/has_cuda_gpu.c ${CMAKE_CURRENT_SOURCE_DIR}/tests/has_cuda_gpu.c
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment