Skip to content

Commit

Permalink
Set try_compile() target type
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleFromNVIDIA committed Nov 8, 2024
1 parent 1b80099 commit a87fc27
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ 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 Down Expand Up @@ -113,6 +115,7 @@ else()
)
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 a87fc27

Please sign in to comment.