Update all samples to build position-independent code

This commit is contained in:
Rob Armstrong
2025-01-09 09:55:07 -08:00
parent e8492d1a78
commit f753e86e7a
197 changed files with 418 additions and 19 deletions

View File

@@ -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)