mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2026-10-25 22:28:17 +08:00
Update all samples to build position-independent code
This commit is contained in:
@@ -53,6 +53,8 @@ if (${CMAKE_VERSION} VERSION_LESS 3.18.0)
|
||||
else () # Else, we're using cmake versions >= 3.18.
|
||||
cmake_policy(SET CMP0074 NEW) # Use CUDAToolkit_ROOT as a cmake prefix.
|
||||
find_package(CUDAToolkit REQUIRED)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
set(CUDA_LIB "${CUDA_cuda_driver_LIBRARY}")
|
||||
include_directories("${CUDAToolkit_INCLUDE_DIRS}")
|
||||
get_filename_component(CUDA_HOME "${CUDAToolkit_BIN_DIR}" DIRECTORY)
|
||||
|
||||
Reference in New Issue
Block a user