Skip to content

Commit

Permalink
Fixes #563: Now enabling the C++ language for the project, which is n…
Browse files Browse the repository at this point in the history
…ecessary for relying on the Threads library
  • Loading branch information
Eyal Rozenberg authored and eyalroz committed Jan 1, 2024
1 parent d48b1b6 commit 0246310
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "lib/")
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "lib/")

find_package(CUDAToolkit 9.0 REQUIRED)
enable_language(CXX) # required for using Threads
find_package(Threads REQUIRED)
if(CUDAToolkit_VERSION VERSION_GREATER_EQUAL 11.1)
foreach(tgt in nvptxcompiler nvptxcompiler_static)
Expand Down
3 changes: 2 additions & 1 deletion cmake/cuda-api-wrappers-config.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
include(CMakeFindDependencyMacro)

enable_language(CXX)
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
find_dependency(Threads)
find_dependency(CUDAToolkit)

include("${CURRENT_LIST_DIR}/cuda-api-wrappers-targets.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/cuda-api-wrappers-targets.cmake")

0 comments on commit 0246310

Please sign in to comment.