Skip to content

Commit

Permalink
Use LINK_LIBRARIES instead
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Nov 8, 2024
1 parent a87fc27 commit 945df21
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ else()
set(cuFile_FOUND 1)

# Check batch and stream API support (cuFile_BATCH_API_FOUND and cuFile_STREAM_API_FOUND)
set(_old_type ${CMAKE_TRY_COMPILE_TARGET_TYPE})
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
try_compile(
cuFile_BATCH_API_FOUND SOURCE_FROM_CONTENT
batch.cpp
Expand All @@ -96,6 +94,7 @@ else()
return 0;
}
]]
LINK_LIBRARIES CUDA::cuFile
OUTPUT_VARIABLE batch_output
)
message(STATUS "batch output: ${batch_output}")
Expand All @@ -111,11 +110,11 @@ else()
return 0;
}
]]
LINK_LIBRARIES CUDA::cuFile
OUTPUT_VARIABLE stream_output
)
message(STATUS "stream output: ${stream_output}")
message(STATUS "Found cuFile Stream API: ${cuFile_STREAM_API_FOUND}")
set(CMAKE_TRY_COMPILE_TARGET_TYPE ${_old_type})
endif()

include(cmake/thirdparty/get_thread_pool.cmake)
Expand Down

0 comments on commit 945df21

Please sign in to comment.