From 0246310056ed6e50f8ce014bdaef840e074098f8 Mon Sep 17 00:00:00 2001 From: Eyal Rozenberg Date: Sun, 31 Dec 2023 16:51:00 +0200 Subject: [PATCH] Fixes #563: Now enabling the C++ language for the project, which is necessary for relying on the Threads library --- CMakeLists.txt | 1 + cmake/cuda-api-wrappers-config.cmake | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 487fe0b9..303e33ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/cuda-api-wrappers-config.cmake b/cmake/cuda-api-wrappers-config.cmake index 47bed4a4..50607068 100644 --- a/cmake/cuda-api-wrappers-config.cmake +++ b/cmake/cuda-api-wrappers-config.cmake @@ -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")