From 4eae2ccc041ef675195ab3a3c91c1c5afc668471 Mon Sep 17 00:00:00 2001 From: Shawn Zeng Date: Tue, 4 Nov 2025 16:21:23 +0800 Subject: [PATCH] Bug 5591814: Support "make install" in single sample folder --- CMakeLists.txt | 6 - .../UnifiedMemoryStreams/CMakeLists.txt | 4 + .../0_Introduction/asyncAPI/CMakeLists.txt | 4 + Samples/0_Introduction/clock/CMakeLists.txt | 4 + .../0_Introduction/clock_nvrtc/CMakeLists.txt | 4 + .../0_Introduction/cudaOpenMP/CMakeLists.txt | 4 + .../fp16ScalarProduct/CMakeLists.txt | 4 + .../0_Introduction/matrixMul/CMakeLists.txt | 4 + .../matrixMulDrv/CMakeLists.txt | 4 + .../matrixMulDynlinkJIT/CMakeLists.txt | 4 + .../matrixMul_nvrtc/CMakeLists.txt | 4 + .../0_Introduction/mergeSort/CMakeLists.txt | 4 + .../simpleAWBarrier/CMakeLists.txt | 4 + .../simpleAssert/CMakeLists.txt | 4 + .../simpleAssert_nvrtc/CMakeLists.txt | 4 + .../simpleAtomicIntrinsics/CMakeLists.txt | 4 + .../CMakeLists.txt | 4 + .../simpleAttributes/CMakeLists.txt | 4 + .../simpleCUDA2GL/CMakeLists.txt | 4 + .../simpleCallback/CMakeLists.txt | 4 + .../simpleCooperativeGroups/CMakeLists.txt | 4 + .../simpleCubemapTexture/CMakeLists.txt | 4 + .../simpleDrvRuntime/CMakeLists.txt | 4 + .../simpleHyperQ/CMakeLists.txt | 4 + .../0_Introduction/simpleIPC/CMakeLists.txt | 4 + .../simpleLayeredTexture/CMakeLists.txt | 4 + .../0_Introduction/simpleMPI/CMakeLists.txt | 4 + .../simpleMultiCopy/CMakeLists.txt | 4 + .../simpleMultiGPU/CMakeLists.txt | 4 + .../simpleOccupancy/CMakeLists.txt | 4 + .../0_Introduction/simpleP2P/CMakeLists.txt | 4 + .../simplePitchLinearTexture/CMakeLists.txt | 4 + .../simplePrintf/CMakeLists.txt | 4 + .../simpleStreams/CMakeLists.txt | 4 + .../simpleSurfaceWrite/CMakeLists.txt | 4 + .../simpleTemplates/CMakeLists.txt | 4 + .../simpleTexture/CMakeLists.txt | 4 + .../simpleTexture3D/CMakeLists.txt | 4 + .../simpleTextureDrv/CMakeLists.txt | 4 + .../simpleVoteIntrinsics/CMakeLists.txt | 4 + .../simpleZeroCopy/CMakeLists.txt | 4 + .../systemWideAtomics/CMakeLists.txt | 4 + .../0_Introduction/template/CMakeLists.txt | 4 + .../0_Introduction/vectorAdd/CMakeLists.txt | 4 + .../vectorAddDrv/CMakeLists.txt | 4 + .../vectorAddMMAP/CMakeLists.txt | 4 + .../vectorAdd_nvrtc/CMakeLists.txt | 4 + .../1_Utilities/deviceQuery/CMakeLists.txt | 4 + .../1_Utilities/deviceQueryDrv/CMakeLists.txt | 4 + .../1_Utilities/topologyQuery/CMakeLists.txt | 4 + .../EGLStream_CUDA_CrossGPU/CMakeLists.txt | 4 + .../EGLStream_CUDA_Interop/CMakeLists.txt | 4 + .../FunctionPointers/CMakeLists.txt | 4 + .../MC_EstimatePiInlineP/CMakeLists.txt | 4 + .../MC_EstimatePiInlineQ/CMakeLists.txt | 4 + .../MC_EstimatePiP/CMakeLists.txt | 4 + .../MC_EstimatePiQ/CMakeLists.txt | 4 + .../MC_SingleAsianOptionP/CMakeLists.txt | 4 + .../boxFilter/CMakeLists.txt | 4 + .../convolutionSeparable/CMakeLists.txt | 4 + .../convolutionTexture/CMakeLists.txt | 4 + .../dct8x8/CMakeLists.txt | 4 + .../eigenvalues/CMakeLists.txt | 4 + .../histogram/CMakeLists.txt | 4 + .../imageDenoising/CMakeLists.txt | 4 + .../inlinePTX/CMakeLists.txt | 4 + .../inlinePTX_nvrtc/CMakeLists.txt | 4 + .../interval/CMakeLists.txt | 4 + .../particles/CMakeLists.txt | 4 + .../radixSortThrust/CMakeLists.txt | 4 + .../reduction/CMakeLists.txt | 4 + .../reductionMultiBlockCG/CMakeLists.txt | 4 + .../scalarProd/CMakeLists.txt | 4 + .../scan/CMakeLists.txt | 4 + .../segmentationTreeThrust/CMakeLists.txt | 4 + .../shfl_scan/CMakeLists.txt | 4 + .../sortingNetworks/CMakeLists.txt | 4 + .../streamOrderedAllocation/CMakeLists.txt | 4 + .../streamOrderedAllocationIPC/CMakeLists.txt | 4 + .../streamOrderedAllocationP2P/CMakeLists.txt | 4 + .../threadFenceReduction/CMakeLists.txt | 4 + .../threadMigration/CMakeLists.txt | 4 + .../StreamPriorities/CMakeLists.txt | 4 + .../bf16TensorCoreGemm/CMakeLists.txt | 4 + .../binaryPartitionCG/CMakeLists.txt | 4 + .../bindlessTexture/CMakeLists.txt | 4 + .../cdpAdvancedQuicksort/CMakeLists.txt | 4 + .../cdpBezierTessellation/CMakeLists.txt | 4 + .../cdpQuadtree/CMakeLists.txt | 4 + .../cdpSimplePrint/CMakeLists.txt | 4 + .../cdpSimpleQuicksort/CMakeLists.txt | 4 + .../cudaCompressibleMemory/CMakeLists.txt | 4 + .../cudaTensorCoreGemm/CMakeLists.txt | 4 + .../dmmaTensorCoreGemm/CMakeLists.txt | 4 + .../globalToShmemAsyncCopy/CMakeLists.txt | 4 + .../graphConditionalNodes/CMakeLists.txt | 4 + .../graphMemoryFootprint/CMakeLists.txt | 4 + .../graphMemoryNodes/CMakeLists.txt | 4 + .../immaTensorCoreGemm/CMakeLists.txt | 4 + .../jacobiCudaGraphs/CMakeLists.txt | 4 + .../memMapIPCDrv/CMakeLists.txt | 4 + .../3_CUDA_Features/newdelete/CMakeLists.txt | 4 + Samples/3_CUDA_Features/ptxjit/CMakeLists.txt | 4 + .../simpleCudaGraphs/CMakeLists.txt | 4 + .../tf32TensorCoreGemm/CMakeLists.txt | 4 + .../warpAggregatedAtomicsCG/CMakeLists.txt | 4 + .../FilterBorderControlNPP/CMakeLists.txt | 4 + .../MersenneTwisterGP11213/CMakeLists.txt | 4 + .../batchCUBLAS/CMakeLists.txt | 4 + .../boxFilterNPP/CMakeLists.txt | 4 + .../cannyEdgeDetectorNPP/CMakeLists.txt | 4 + .../conjugateGradient/CMakeLists.txt | 4 + .../CMakeLists.txt | 4 + .../CMakeLists.txt | 4 + .../CMakeLists.txt | 4 + .../conjugateGradientPrecond/CMakeLists.txt | 4 + .../conjugateGradientUM/CMakeLists.txt | 4 + .../cuSolverDn_LinearSolver/CMakeLists.txt | 4 + .../cuSolverRf/CMakeLists.txt | 4 + .../cuSolverSp_LinearSolver/CMakeLists.txt | 4 + .../CMakeLists.txt | 4 + .../cuSolverSp_LowlevelQR/CMakeLists.txt | 4 + .../4_CUDA_Libraries/cudaNvSci/CMakeLists.txt | 4 + .../freeImageInteropNPP/CMakeLists.txt | 4 + .../histEqualizationNPP/CMakeLists.txt | 4 + .../4_CUDA_Libraries/jitLto/CMakeLists.txt | 4 + .../lineOfSight/CMakeLists.txt | 4 + .../matrixMulCUBLAS/CMakeLists.txt | 4 + .../4_CUDA_Libraries/nvJPEG/CMakeLists.txt | 4 + .../nvJPEG_encoder/CMakeLists.txt | 4 + .../4_CUDA_Libraries/oceanFFT/CMakeLists.txt | 4 + .../4_CUDA_Libraries/randomFog/CMakeLists.txt | 4 + .../simpleCUBLAS/CMakeLists.txt | 4 + .../simpleCUBLASXT/CMakeLists.txt | 4 + .../simpleCUBLAS_LU/CMakeLists.txt | 4 + .../simpleCUFFT/CMakeLists.txt | 4 + .../simpleCUFFT_2d_MGPU/CMakeLists.txt | 4 + .../simpleCUFFT_MGPU/CMakeLists.txt | 4 + .../simpleCUFFT_callback/CMakeLists.txt | 4 + .../watershedSegmentationNPP/CMakeLists.txt | 4 + .../BlackScholes/CMakeLists.txt | 4 + .../BlackScholes_nvrtc/CMakeLists.txt | 4 + .../5_Domain_Specific/FDTD3d/CMakeLists.txt | 4 + .../HSOpticalFlow/CMakeLists.txt | 4 + .../Mandelbrot/CMakeLists.txt | 4 + .../MonteCarloMultiGPU/CMakeLists.txt | 4 + .../NV12toBGRandResize/CMakeLists.txt | 4 + .../SobelFilter/CMakeLists.txt | 4 + .../SobolQRNG/CMakeLists.txt | 4 + .../bicubicTexture/CMakeLists.txt | 4 + .../bilateralFilter/CMakeLists.txt | 4 + .../binomialOptions/CMakeLists.txt | 4 + .../binomialOptions_nvrtc/CMakeLists.txt | 4 + .../convolutionFFT2D/CMakeLists.txt | 4 + .../dwtHaar1D/CMakeLists.txt | 4 + Samples/5_Domain_Specific/dxtc/CMakeLists.txt | 4 + .../fastWalshTransform/CMakeLists.txt | 4 + .../5_Domain_Specific/fluidsGL/CMakeLists.txt | 4 + .../marchingCubes/CMakeLists.txt | 4 + .../5_Domain_Specific/nbody/CMakeLists.txt | 4 + .../p2pBandwidthLatencyTest/CMakeLists.txt | 4 + .../postProcessGL/CMakeLists.txt | 4 + .../quasirandomGenerator/CMakeLists.txt | 4 + .../quasirandomGenerator_nvrtc/CMakeLists.txt | 4 + .../recursiveGaussian/CMakeLists.txt | 4 + .../simpleD3D11/CMakeLists.txt | 4 + .../simpleD3D11Texture/CMakeLists.txt | 4 + .../simpleD3D12/CMakeLists.txt | 4 + .../5_Domain_Specific/simpleGL/CMakeLists.txt | 4 + .../simpleVulkan/CMakeLists.txt | 4 + .../simpleVulkanMMAP/CMakeLists.txt | 4 + .../smokeParticles/CMakeLists.txt | 4 + .../stereoDisparity/CMakeLists.txt | 4 + .../volumeFiltering/CMakeLists.txt | 4 + .../volumeRender/CMakeLists.txt | 4 + .../vulkanImageCUDA/CMakeLists.txt | 4 + .../LargeKernelParameter/CMakeLists.txt | 4 + .../UnifiedMemoryPerf/CMakeLists.txt | 4 + .../6_Performance/alignedTypes/CMakeLists.txt | 4 + .../cudaGraphsPerfScaling/CMakeLists.txt | 4 + .../6_Performance/transpose/CMakeLists.txt | 4 + Samples/7_libNVVM/CMakeLists.txt | 5 + .../7_libNVVM/cuda-c-linking/CMakeLists.txt | 8 +- .../cuda-shared-memory/CMakeLists.txt | 12 +- .../device-side-launch/CMakeLists.txt | 11 +- Samples/7_libNVVM/ptxgen/CMakeLists.txt | 11 +- Samples/7_libNVVM/simple/CMakeLists.txt | 11 +- Samples/7_libNVVM/syscalls/CMakeLists.txt | 11 +- Samples/7_libNVVM/uvmlite/CMakeLists.txt | 11 +- .../8_Platform_Specific/Tegra/CMakeLists.txt | 4 + .../EGLSync_CUDAEvent_Interop/CMakeLists.txt | 4 + .../Tegra/cuDLAErrorReporting/CMakeLists.txt | 4 + .../Tegra/cuDLAHybridMode/CMakeLists.txt | 4 + .../cuDLALayerwiseStatsHybrid/CMakeLists.txt | 4 + .../CMakeLists.txt | 4 + .../Tegra/cuDLAStandaloneMode/CMakeLists.txt | 4 + .../cudaNvSciBufMultiplanar/CMakeLists.txt | 4 + .../Tegra/cudaNvSciNvMedia/CMakeLists.txt | 4 + .../Tegra/fluidsGLES/CMakeLists.txt | 4 + .../Tegra/nbody_opengles/CMakeLists.txt | 4 + .../Tegra/simpleGLES/CMakeLists.txt | 4 + .../Tegra/simpleGLES_EGLOutput/CMakeLists.txt | 4 + cmake/InstallSamples.cmake | 117 +++++++++--------- 203 files changed, 894 insertions(+), 81 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 294bc32d..6dd20c7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,10 +22,4 @@ endif() set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --extended-lambda") -# Include installation configuration -include(cmake/InstallSamples.cmake) - add_subdirectory(Samples) - -# Setup installation for all samples -setup_samples_install() diff --git a/Samples/0_Introduction/UnifiedMemoryStreams/CMakeLists.txt b/Samples/0_Introduction/UnifiedMemoryStreams/CMakeLists.txt index d92baee3..b86e9cb1 100644 --- a/Samples/0_Introduction/UnifiedMemoryStreams/CMakeLists.txt +++ b/Samples/0_Introduction/UnifiedMemoryStreams/CMakeLists.txt @@ -49,3 +49,7 @@ target_compile_features(UnifiedMemoryStreams PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenMP not found - will not build sample 'UnifiedMemoryStreams'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/asyncAPI/CMakeLists.txt b/Samples/0_Introduction/asyncAPI/CMakeLists.txt index 33d160df..ec50945b 100644 --- a/Samples/0_Introduction/asyncAPI/CMakeLists.txt +++ b/Samples/0_Introduction/asyncAPI/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(asyncAPI PRIVATE $<$:--extended-la target_compile_features(asyncAPI PRIVATE cxx_std_17 cuda_std_17) set_target_properties(asyncAPI PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/clock/CMakeLists.txt b/Samples/0_Introduction/clock/CMakeLists.txt index e274a40e..b9d71781 100644 --- a/Samples/0_Introduction/clock/CMakeLists.txt +++ b/Samples/0_Introduction/clock/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(clock PRIVATE $<$:--extended-lambd target_compile_features(clock PRIVATE cxx_std_17 cuda_std_17) set_target_properties(clock PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/clock_nvrtc/CMakeLists.txt b/Samples/0_Introduction/clock_nvrtc/CMakeLists.txt index 94fa4691..9d5abe4c 100644 --- a/Samples/0_Introduction/clock_nvrtc/CMakeLists.txt +++ b/Samples/0_Introduction/clock_nvrtc/CMakeLists.txt @@ -37,3 +37,7 @@ add_custom_command(TARGET clock_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/clock_kernel.cu ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/cudaOpenMP/CMakeLists.txt b/Samples/0_Introduction/cudaOpenMP/CMakeLists.txt index 97749d58..991936c1 100644 --- a/Samples/0_Introduction/cudaOpenMP/CMakeLists.txt +++ b/Samples/0_Introduction/cudaOpenMP/CMakeLists.txt @@ -37,3 +37,7 @@ target_compile_features(cudaOpenMP PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenMP not found - will not build sample 'cudaOpenMP'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/fp16ScalarProduct/CMakeLists.txt b/Samples/0_Introduction/fp16ScalarProduct/CMakeLists.txt index 0906205c..3f2a3d34 100644 --- a/Samples/0_Introduction/fp16ScalarProduct/CMakeLists.txt +++ b/Samples/0_Introduction/fp16ScalarProduct/CMakeLists.txt @@ -27,3 +27,7 @@ target_compile_options(fp16ScalarProduct PRIVATE $<$:--ex target_compile_features(fp16ScalarProduct PRIVATE cxx_std_17 cuda_std_17) set_target_properties(fp16ScalarProduct PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/matrixMul/CMakeLists.txt b/Samples/0_Introduction/matrixMul/CMakeLists.txt index 004967e2..9293df3f 100644 --- a/Samples/0_Introduction/matrixMul/CMakeLists.txt +++ b/Samples/0_Introduction/matrixMul/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(matrixMul PRIVATE $<$:--extended-l target_compile_features(matrixMul PRIVATE cxx_std_17 cuda_std_17) set_target_properties(matrixMul PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/matrixMulDrv/CMakeLists.txt b/Samples/0_Introduction/matrixMulDrv/CMakeLists.txt index c777fbd6..735cbe62 100644 --- a/Samples/0_Introduction/matrixMulDrv/CMakeLists.txt +++ b/Samples/0_Introduction/matrixMulDrv/CMakeLists.txt @@ -66,3 +66,7 @@ add_custom_target(generate_fatbin_matmulDrv ALL DEPENDS ${CUDA_FATBIN_FILE}) # Ensure matrixMulDrv depends on the fatbin add_dependencies(matrixMulDrv generate_fatbin_matmulDrv) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/matrixMulDynlinkJIT/CMakeLists.txt b/Samples/0_Introduction/matrixMulDynlinkJIT/CMakeLists.txt index 3058893e..6cd324cd 100644 --- a/Samples/0_Introduction/matrixMulDynlinkJIT/CMakeLists.txt +++ b/Samples/0_Introduction/matrixMulDynlinkJIT/CMakeLists.txt @@ -45,3 +45,7 @@ target_link_libraries(matrixMulDynlinkJIT PUBLIC if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") target_link_libraries(matrixMulDynlinkJIT PUBLIC dl) endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/matrixMul_nvrtc/CMakeLists.txt b/Samples/0_Introduction/matrixMul_nvrtc/CMakeLists.txt index 48c4d32d..adaa1d48 100644 --- a/Samples/0_Introduction/matrixMul_nvrtc/CMakeLists.txt +++ b/Samples/0_Introduction/matrixMul_nvrtc/CMakeLists.txt @@ -55,3 +55,7 @@ add_custom_command(TARGET matrixMul_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CUDA_INCLUDE_DIR}/cccl/cuda ${CMAKE_CURRENT_BINARY_DIR}/cuda ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/mergeSort/CMakeLists.txt b/Samples/0_Introduction/mergeSort/CMakeLists.txt index e8036b72..cc8747ca 100644 --- a/Samples/0_Introduction/mergeSort/CMakeLists.txt +++ b/Samples/0_Introduction/mergeSort/CMakeLists.txt @@ -31,3 +31,7 @@ set_target_properties(mergeSort PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(mergeSort PRIVATE ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleAWBarrier/CMakeLists.txt b/Samples/0_Introduction/simpleAWBarrier/CMakeLists.txt index 18f001e2..7bcb8360 100644 --- a/Samples/0_Introduction/simpleAWBarrier/CMakeLists.txt +++ b/Samples/0_Introduction/simpleAWBarrier/CMakeLists.txt @@ -35,3 +35,7 @@ target_compile_options(simpleAWBarrier PRIVATE $<$:--exte target_compile_features(simpleAWBarrier PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleAWBarrier PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleAssert/CMakeLists.txt b/Samples/0_Introduction/simpleAssert/CMakeLists.txt index 87d328c4..ab0406c8 100644 --- a/Samples/0_Introduction/simpleAssert/CMakeLists.txt +++ b/Samples/0_Introduction/simpleAssert/CMakeLists.txt @@ -31,3 +31,7 @@ target_compile_options(simpleAssert PRIVATE $<$:--extende target_compile_features(simpleAssert PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleAssert PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleAssert_nvrtc/CMakeLists.txt b/Samples/0_Introduction/simpleAssert_nvrtc/CMakeLists.txt index 263d7963..d473058e 100644 --- a/Samples/0_Introduction/simpleAssert_nvrtc/CMakeLists.txt +++ b/Samples/0_Introduction/simpleAssert_nvrtc/CMakeLists.txt @@ -37,3 +37,7 @@ add_custom_command(TARGET simpleAssert_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/simpleAssert_kernel.cu ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleAtomicIntrinsics/CMakeLists.txt b/Samples/0_Introduction/simpleAtomicIntrinsics/CMakeLists.txt index 4203a937..7ec8e447 100644 --- a/Samples/0_Introduction/simpleAtomicIntrinsics/CMakeLists.txt +++ b/Samples/0_Introduction/simpleAtomicIntrinsics/CMakeLists.txt @@ -29,3 +29,7 @@ target_compile_options(simpleAtomicIntrinsics PRIVATE $<$ target_compile_features(simpleAtomicIntrinsics PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleAtomicIntrinsics PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleAtomicIntrinsics_nvrtc/CMakeLists.txt b/Samples/0_Introduction/simpleAtomicIntrinsics_nvrtc/CMakeLists.txt index 3aac1e90..9c659d62 100644 --- a/Samples/0_Introduction/simpleAtomicIntrinsics_nvrtc/CMakeLists.txt +++ b/Samples/0_Introduction/simpleAtomicIntrinsics_nvrtc/CMakeLists.txt @@ -38,3 +38,7 @@ add_custom_command(TARGET simpleAtomicIntrinsics_nvrtc POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/simpleAtomicIntrinsics_kernel.cuh ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleAttributes/CMakeLists.txt b/Samples/0_Introduction/simpleAttributes/CMakeLists.txt index 389fdfc8..d481f57b 100644 --- a/Samples/0_Introduction/simpleAttributes/CMakeLists.txt +++ b/Samples/0_Introduction/simpleAttributes/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleAttributes PRIVATE $<$:--ext target_compile_features(simpleAttributes PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleAttributes PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt b/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt index 64a46f06..661eba02 100644 --- a/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt +++ b/Samples/0_Introduction/simpleCUDA2GL/CMakeLists.txt @@ -86,3 +86,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'simpleCUDA2GL'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleCallback/CMakeLists.txt b/Samples/0_Introduction/simpleCallback/CMakeLists.txt index 1c907a6d..8c19b28f 100644 --- a/Samples/0_Introduction/simpleCallback/CMakeLists.txt +++ b/Samples/0_Introduction/simpleCallback/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleCallback PRIVATE $<$:--exten target_compile_features(simpleCallback PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleCallback PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleCooperativeGroups/CMakeLists.txt b/Samples/0_Introduction/simpleCooperativeGroups/CMakeLists.txt index e1d3d5d9..cd0659f0 100644 --- a/Samples/0_Introduction/simpleCooperativeGroups/CMakeLists.txt +++ b/Samples/0_Introduction/simpleCooperativeGroups/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleCooperativeGroups PRIVATE $<$:- target_compile_features(simpleCubemapTexture PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleCubemapTexture PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleDrvRuntime/CMakeLists.txt b/Samples/0_Introduction/simpleDrvRuntime/CMakeLists.txt index 0774b4d5..a05e5b60 100644 --- a/Samples/0_Introduction/simpleDrvRuntime/CMakeLists.txt +++ b/Samples/0_Introduction/simpleDrvRuntime/CMakeLists.txt @@ -68,3 +68,7 @@ add_custom_target(generate_fatbin_simpleDrv ALL DEPENDS ${CUDA_FATBIN_FILE}) # Ensure simpleDrvRuntime depends on the fatbin add_dependencies(simpleDrvRuntime generate_fatbin_simpleDrv) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleHyperQ/CMakeLists.txt b/Samples/0_Introduction/simpleHyperQ/CMakeLists.txt index add335e5..160d058f 100644 --- a/Samples/0_Introduction/simpleHyperQ/CMakeLists.txt +++ b/Samples/0_Introduction/simpleHyperQ/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleHyperQ PRIVATE $<$:--extende target_compile_features(simpleHyperQ PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleHyperQ PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleIPC/CMakeLists.txt b/Samples/0_Introduction/simpleIPC/CMakeLists.txt index 424f98ca..2e88a7e0 100644 --- a/Samples/0_Introduction/simpleIPC/CMakeLists.txt +++ b/Samples/0_Introduction/simpleIPC/CMakeLists.txt @@ -32,3 +32,7 @@ else() set_target_properties(simpleIPC PROPERTIES CUDA_SEPARABLE_COMPILATION ON) endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleLayeredTexture/CMakeLists.txt b/Samples/0_Introduction/simpleLayeredTexture/CMakeLists.txt index a60a9d27..86ad2817 100644 --- a/Samples/0_Introduction/simpleLayeredTexture/CMakeLists.txt +++ b/Samples/0_Introduction/simpleLayeredTexture/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleLayeredTexture PRIVATE $<$:- target_compile_features(simpleLayeredTexture PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleLayeredTexture PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleMPI/CMakeLists.txt b/Samples/0_Introduction/simpleMPI/CMakeLists.txt index 3c781f03..77b78c10 100644 --- a/Samples/0_Introduction/simpleMPI/CMakeLists.txt +++ b/Samples/0_Introduction/simpleMPI/CMakeLists.txt @@ -44,3 +44,7 @@ target_compile_features(simpleMPI PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "MPI not found - will not build sample 'simpleMPI'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleMultiCopy/CMakeLists.txt b/Samples/0_Introduction/simpleMultiCopy/CMakeLists.txt index 0e922b68..1e2d809e 100644 --- a/Samples/0_Introduction/simpleMultiCopy/CMakeLists.txt +++ b/Samples/0_Introduction/simpleMultiCopy/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleMultiCopy PRIVATE $<$:--exte target_compile_features(simpleMultiCopy PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleMultiCopy PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleMultiGPU/CMakeLists.txt b/Samples/0_Introduction/simpleMultiGPU/CMakeLists.txt index 81ed2c4e..e88e0c29 100644 --- a/Samples/0_Introduction/simpleMultiGPU/CMakeLists.txt +++ b/Samples/0_Introduction/simpleMultiGPU/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleMultiGPU PRIVATE $<$:--exten target_compile_features(simpleMultiGPU PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleMultiGPU PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleOccupancy/CMakeLists.txt b/Samples/0_Introduction/simpleOccupancy/CMakeLists.txt index c5081c68..fbd4ec77 100644 --- a/Samples/0_Introduction/simpleOccupancy/CMakeLists.txt +++ b/Samples/0_Introduction/simpleOccupancy/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleOccupancy PRIVATE $<$:--exte target_compile_features(simpleOccupancy PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleOccupancy PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleP2P/CMakeLists.txt b/Samples/0_Introduction/simpleP2P/CMakeLists.txt index f229e4b4..ddfe6c11 100644 --- a/Samples/0_Introduction/simpleP2P/CMakeLists.txt +++ b/Samples/0_Introduction/simpleP2P/CMakeLists.txt @@ -32,3 +32,7 @@ else() set_target_properties(simpleP2P PROPERTIES CUDA_SEPARABLE_COMPILATION ON) endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simplePitchLinearTexture/CMakeLists.txt b/Samples/0_Introduction/simplePitchLinearTexture/CMakeLists.txt index 3aaee214..7a72745c 100644 --- a/Samples/0_Introduction/simplePitchLinearTexture/CMakeLists.txt +++ b/Samples/0_Introduction/simplePitchLinearTexture/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simplePitchLinearTexture PRIVATE $<$:--extende target_compile_features(simplePrintf PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simplePrintf PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleStreams/CMakeLists.txt b/Samples/0_Introduction/simpleStreams/CMakeLists.txt index 2c9723b3..8e4be29e 100644 --- a/Samples/0_Introduction/simpleStreams/CMakeLists.txt +++ b/Samples/0_Introduction/simpleStreams/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleStreams PRIVATE $<$:--extend target_compile_features(simpleStreams PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleStreams PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleSurfaceWrite/CMakeLists.txt b/Samples/0_Introduction/simpleSurfaceWrite/CMakeLists.txt index f48cbd2a..f7c5d5fc 100644 --- a/Samples/0_Introduction/simpleSurfaceWrite/CMakeLists.txt +++ b/Samples/0_Introduction/simpleSurfaceWrite/CMakeLists.txt @@ -35,3 +35,7 @@ add_custom_command(TARGET simpleSurfaceWrite POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleTemplates/CMakeLists.txt b/Samples/0_Introduction/simpleTemplates/CMakeLists.txt index 939ba37d..e4ae61e1 100644 --- a/Samples/0_Introduction/simpleTemplates/CMakeLists.txt +++ b/Samples/0_Introduction/simpleTemplates/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleTemplates PRIVATE $<$:--exte target_compile_features(simpleTemplates PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleTemplates PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleTexture/CMakeLists.txt b/Samples/0_Introduction/simpleTexture/CMakeLists.txt index 8522dbb4..d6a37b65 100644 --- a/Samples/0_Introduction/simpleTexture/CMakeLists.txt +++ b/Samples/0_Introduction/simpleTexture/CMakeLists.txt @@ -42,3 +42,7 @@ add_custom_command(TARGET simpleTexture POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data/ref_rotated.pgm ${CMAKE_CURRENT_BINARY_DIR}/ ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt b/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt index 9dc04d43..f6baaf28 100644 --- a/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt +++ b/Samples/0_Introduction/simpleTexture3D/CMakeLists.txt @@ -90,3 +90,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'simpleTexture3D'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleTextureDrv/CMakeLists.txt b/Samples/0_Introduction/simpleTextureDrv/CMakeLists.txt index 19f7f079..e9e36b02 100644 --- a/Samples/0_Introduction/simpleTextureDrv/CMakeLists.txt +++ b/Samples/0_Introduction/simpleTextureDrv/CMakeLists.txt @@ -79,3 +79,7 @@ add_custom_target(generate_fatbin_textureDrv ALL DEPENDS ${CUDA_FATBIN_FILE}) # Ensure simpleTextureDrv depends on the fatbin add_dependencies(simpleTextureDrv generate_fatbin_textureDrv) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleVoteIntrinsics/CMakeLists.txt b/Samples/0_Introduction/simpleVoteIntrinsics/CMakeLists.txt index c999b003..11fa110f 100644 --- a/Samples/0_Introduction/simpleVoteIntrinsics/CMakeLists.txt +++ b/Samples/0_Introduction/simpleVoteIntrinsics/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleVoteIntrinsics PRIVATE $<$:- target_compile_features(simpleVoteIntrinsics PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleVoteIntrinsics PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/simpleZeroCopy/CMakeLists.txt b/Samples/0_Introduction/simpleZeroCopy/CMakeLists.txt index c20b3c98..536271db 100644 --- a/Samples/0_Introduction/simpleZeroCopy/CMakeLists.txt +++ b/Samples/0_Introduction/simpleZeroCopy/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleZeroCopy PRIVATE $<$:--exten target_compile_features(simpleZeroCopy PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleZeroCopy PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt b/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt index 9dba6850..7e37ff90 100644 --- a/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt +++ b/Samples/0_Introduction/systemWideAtomics/CMakeLists.txt @@ -36,3 +36,7 @@ else() message(STATUS "Will not build sample systemWideAtomics - requires Linux OS") endif() endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/template/CMakeLists.txt b/Samples/0_Introduction/template/CMakeLists.txt index 3e408dee..42e614e9 100644 --- a/Samples/0_Introduction/template/CMakeLists.txt +++ b/Samples/0_Introduction/template/CMakeLists.txt @@ -29,3 +29,7 @@ target_compile_options(template PRIVATE $<$:--extended-la target_compile_features(template PRIVATE cxx_std_17 cuda_std_17) set_target_properties(template PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/vectorAdd/CMakeLists.txt b/Samples/0_Introduction/vectorAdd/CMakeLists.txt index e1f4c2e1..b3f03225 100644 --- a/Samples/0_Introduction/vectorAdd/CMakeLists.txt +++ b/Samples/0_Introduction/vectorAdd/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(vectorAdd PRIVATE $<$:--extended-l target_compile_features(vectorAdd PRIVATE cxx_std_17 cuda_std_17) set_target_properties(vectorAdd PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/vectorAddDrv/CMakeLists.txt b/Samples/0_Introduction/vectorAddDrv/CMakeLists.txt index 0b6a3477..a08c02c9 100644 --- a/Samples/0_Introduction/vectorAddDrv/CMakeLists.txt +++ b/Samples/0_Introduction/vectorAddDrv/CMakeLists.txt @@ -65,3 +65,7 @@ add_custom_target(generate_fatbin_vectorAdd ALL DEPENDS ${CUDA_FATBIN_FILE}) # Ensure matrixMulDrv depends on the fatbin add_dependencies(vectorAddDrv generate_fatbin_vectorAdd) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/vectorAddMMAP/CMakeLists.txt b/Samples/0_Introduction/vectorAddMMAP/CMakeLists.txt index c8b9949b..8989d1c3 100644 --- a/Samples/0_Introduction/vectorAddMMAP/CMakeLists.txt +++ b/Samples/0_Introduction/vectorAddMMAP/CMakeLists.txt @@ -61,3 +61,7 @@ else() # Ensure matrixMulDrv depends on the fatbin add_dependencies(vectorAddMMAP generate_fatbin_vectorAddMMAP) endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/0_Introduction/vectorAdd_nvrtc/CMakeLists.txt b/Samples/0_Introduction/vectorAdd_nvrtc/CMakeLists.txt index 5f5ca542..75350c96 100644 --- a/Samples/0_Introduction/vectorAdd_nvrtc/CMakeLists.txt +++ b/Samples/0_Introduction/vectorAdd_nvrtc/CMakeLists.txt @@ -37,3 +37,7 @@ add_custom_command(TARGET vectorAdd_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/vectorAdd_kernel.cu ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/1_Utilities/deviceQuery/CMakeLists.txt b/Samples/1_Utilities/deviceQuery/CMakeLists.txt index eed2acd4..110d95cd 100644 --- a/Samples/1_Utilities/deviceQuery/CMakeLists.txt +++ b/Samples/1_Utilities/deviceQuery/CMakeLists.txt @@ -36,3 +36,7 @@ target_include_directories(deviceQuery PRIVATE target_link_libraries(deviceQuery PUBLIC CUDA::cudart ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/1_Utilities/deviceQueryDrv/CMakeLists.txt b/Samples/1_Utilities/deviceQueryDrv/CMakeLists.txt index c891ef03..ecb57221 100644 --- a/Samples/1_Utilities/deviceQueryDrv/CMakeLists.txt +++ b/Samples/1_Utilities/deviceQueryDrv/CMakeLists.txt @@ -35,3 +35,7 @@ target_include_directories(deviceQueryDrv PRIVATE target_link_libraries(deviceQueryDrv PUBLIC CUDA::cuda_driver ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/1_Utilities/topologyQuery/CMakeLists.txt b/Samples/1_Utilities/topologyQuery/CMakeLists.txt index e8b236b9..7d83b778 100644 --- a/Samples/1_Utilities/topologyQuery/CMakeLists.txt +++ b/Samples/1_Utilities/topologyQuery/CMakeLists.txt @@ -32,3 +32,7 @@ else() set_target_properties(topologyQuery PROPERTIES CUDA_SEPARABLE_COMPILATION ON) endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt index f576cd75..4db89334 100644 --- a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_CrossGPU/CMakeLists.txt @@ -48,3 +48,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample EGLStream_CUDA_CrossGPU - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt index ced3a650..b02abc04 100644 --- a/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/EGLStream_CUDA_Interop/CMakeLists.txt @@ -49,3 +49,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample EGLStream_CUDA_Interop - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt index d8510071..be26e2dc 100644 --- a/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/FunctionPointers/CMakeLists.txt @@ -90,3 +90,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'FunctionPointers'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineP/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineP/CMakeLists.txt index a2a6d274..191b97ba 100644 --- a/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineP/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineP/CMakeLists.txt @@ -33,3 +33,7 @@ target_include_directories(MC_EstimatePiInlineP PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineQ/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineQ/CMakeLists.txt index b14574d8..da2e1cac 100644 --- a/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineQ/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/MC_EstimatePiInlineQ/CMakeLists.txt @@ -37,3 +37,7 @@ target_include_directories(MC_EstimatePiInlineQ PUBLIC target_link_libraries(MC_EstimatePiInlineQ PUBLIC CUDA::curand ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/MC_EstimatePiP/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/MC_EstimatePiP/CMakeLists.txt index 13809deb..66ff5979 100644 --- a/Samples/2_Concepts_and_Techniques/MC_EstimatePiP/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/MC_EstimatePiP/CMakeLists.txt @@ -37,3 +37,7 @@ target_include_directories(MC_EstimatePiP PUBLIC target_link_libraries(MC_EstimatePiP PUBLIC CUDA::curand ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/MC_EstimatePiQ/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/MC_EstimatePiQ/CMakeLists.txt index 27347048..bc06b8db 100644 --- a/Samples/2_Concepts_and_Techniques/MC_EstimatePiQ/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/MC_EstimatePiQ/CMakeLists.txt @@ -37,3 +37,7 @@ target_include_directories(MC_EstimatePiQ PUBLIC target_link_libraries(MC_EstimatePiQ PUBLIC CUDA::curand ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/MC_SingleAsianOptionP/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/MC_SingleAsianOptionP/CMakeLists.txt index 662ac04c..e1d497a3 100644 --- a/Samples/2_Concepts_and_Techniques/MC_SingleAsianOptionP/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/MC_SingleAsianOptionP/CMakeLists.txt @@ -33,3 +33,7 @@ target_include_directories(MC_SingleAsianOptionP PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/inc ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt index 261f5fa5..8273fa7f 100644 --- a/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/boxFilter/CMakeLists.txt @@ -90,3 +90,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'boxFilter'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/convolutionSeparable/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/convolutionSeparable/CMakeLists.txt index 9700d3da..5fe32b58 100644 --- a/Samples/2_Concepts_and_Techniques/convolutionSeparable/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/convolutionSeparable/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(convolutionSeparable PROPERTIES CUDA_SEPARABLE_COMPILATION target_include_directories(convolutionSeparable PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/convolutionTexture/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/convolutionTexture/CMakeLists.txt index 53933f43..a9589288 100644 --- a/Samples/2_Concepts_and_Techniques/convolutionTexture/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/convolutionTexture/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(convolutionTexture PROPERTIES CUDA_SEPARABLE_COMPILATION O target_include_directories(convolutionTexture PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/dct8x8/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/dct8x8/CMakeLists.txt index 3d91e837..4bd93758 100644 --- a/Samples/2_Concepts_and_Techniques/dct8x8/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/dct8x8/CMakeLists.txt @@ -53,3 +53,7 @@ add_custom_command(TARGET dct8x8 POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data/teapot512.bmp ${CMAKE_CURRENT_BINARY_DIR}/ ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/eigenvalues/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/eigenvalues/CMakeLists.txt index 7e2c61ff..af6f0355 100644 --- a/Samples/2_Concepts_and_Techniques/eigenvalues/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/eigenvalues/CMakeLists.txt @@ -49,3 +49,7 @@ add_custom_command(TARGET eigenvalues POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data/reference.dat ${CMAKE_CURRENT_BINARY_DIR}/ ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/histogram/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/histogram/CMakeLists.txt index 4562f495..e646362a 100644 --- a/Samples/2_Concepts_and_Techniques/histogram/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/histogram/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(histogram PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(histogram PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt index a7ec3b89..aeab370b 100644 --- a/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/imageDenoising/CMakeLists.txt @@ -91,3 +91,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'imageDenoising'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/inlinePTX/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/inlinePTX/CMakeLists.txt index 415ba3af..5ae41446 100644 --- a/Samples/2_Concepts_and_Techniques/inlinePTX/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/inlinePTX/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(inlinePTX PRIVATE $<$:--extended-l target_compile_features(inlinePTX PRIVATE cxx_std_17 cuda_std_17) set_target_properties(inlinePTX PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/inlinePTX_nvrtc/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/inlinePTX_nvrtc/CMakeLists.txt index e4fef34b..0a429aa1 100644 --- a/Samples/2_Concepts_and_Techniques/inlinePTX_nvrtc/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/inlinePTX_nvrtc/CMakeLists.txt @@ -39,3 +39,7 @@ add_custom_command(TARGET inlinePTX_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/inlinePTX_kernel.cu ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/interval/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/interval/CMakeLists.txt index 3171afd5..d0d7e097 100644 --- a/Samples/2_Concepts_and_Techniques/interval/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/interval/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(interval PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(interval PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt index 9e1badf9..7441b7d8 100644 --- a/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/particles/CMakeLists.txt @@ -93,3 +93,7 @@ target_compile_features(particles PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'particles'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/radixSortThrust/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/radixSortThrust/CMakeLists.txt index d9010971..291522c0 100644 --- a/Samples/2_Concepts_and_Techniques/radixSortThrust/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/radixSortThrust/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(radixSortThrust PRIVATE $<$:--exte target_compile_features(radixSortThrust PRIVATE cxx_std_17 cuda_std_17) set_target_properties(radixSortThrust PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/reduction/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/reduction/CMakeLists.txt index 2c5df2fc..4f2c1fa3 100644 --- a/Samples/2_Concepts_and_Techniques/reduction/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/reduction/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(reduction PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(reduction PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/reductionMultiBlockCG/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/reductionMultiBlockCG/CMakeLists.txt index 02b9f84d..8be01c85 100644 --- a/Samples/2_Concepts_and_Techniques/reductionMultiBlockCG/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/reductionMultiBlockCG/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(reductionMultiBlockCG PRIVATE $<$: target_compile_features(reductionMultiBlockCG PRIVATE cxx_std_17 cuda_std_17) set_target_properties(reductionMultiBlockCG PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/scalarProd/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/scalarProd/CMakeLists.txt index fb99c066..9defe3d1 100644 --- a/Samples/2_Concepts_and_Techniques/scalarProd/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/scalarProd/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(scalarProd PRIVATE $<$:--extended- target_compile_features(scalarProd PRIVATE cxx_std_17 cuda_std_17) set_target_properties(scalarProd PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/scan/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/scan/CMakeLists.txt index 23e130cd..a2de5f22 100644 --- a/Samples/2_Concepts_and_Techniques/scan/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/scan/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(scan PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(scan PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/segmentationTreeThrust/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/segmentationTreeThrust/CMakeLists.txt index cfab78cc..35279fee 100644 --- a/Samples/2_Concepts_and_Techniques/segmentationTreeThrust/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/segmentationTreeThrust/CMakeLists.txt @@ -49,3 +49,7 @@ add_custom_command(TARGET segmentationTreeThrust POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data/ref_09.ppm ${CMAKE_CURRENT_BINARY_DIR}/ ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/shfl_scan/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/shfl_scan/CMakeLists.txt index 27a27b2b..7292f91c 100644 --- a/Samples/2_Concepts_and_Techniques/shfl_scan/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/shfl_scan/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(shfl_scan PRIVATE $<$:--extended-l target_compile_features(shfl_scan PRIVATE cxx_std_17 cuda_std_17) set_target_properties(shfl_scan PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/sortingNetworks/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/sortingNetworks/CMakeLists.txt index 3b3cf079..fbefb053 100644 --- a/Samples/2_Concepts_and_Techniques/sortingNetworks/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/sortingNetworks/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(sortingNetworks PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(sortingNetworks PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/streamOrderedAllocation/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/streamOrderedAllocation/CMakeLists.txt index 1d276c50..d57efb15 100644 --- a/Samples/2_Concepts_and_Techniques/streamOrderedAllocation/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/streamOrderedAllocation/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(streamOrderedAllocation PRIVATE $<$:- target_compile_features(threadFenceReduction PRIVATE cxx_std_17 cuda_std_17) set_target_properties(threadFenceReduction PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/2_Concepts_and_Techniques/threadMigration/CMakeLists.txt b/Samples/2_Concepts_and_Techniques/threadMigration/CMakeLists.txt index cd04098a..81b626ff 100644 --- a/Samples/2_Concepts_and_Techniques/threadMigration/CMakeLists.txt +++ b/Samples/2_Concepts_and_Techniques/threadMigration/CMakeLists.txt @@ -70,3 +70,7 @@ add_custom_target(generate_fatbin_threadMigration ALL DEPENDS ${CUDA_FATBIN_FILE # Ensure matrixMulDrv depends on the fatbin add_dependencies(threadMigration generate_fatbin_threadMigration) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt b/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt index 4ca5c426..d2b347bb 100644 --- a/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt +++ b/Samples/3_CUDA_Features/StreamPriorities/CMakeLists.txt @@ -36,3 +36,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample StreamPriorities - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/bf16TensorCoreGemm/CMakeLists.txt b/Samples/3_CUDA_Features/bf16TensorCoreGemm/CMakeLists.txt index 3e949ec6..4bec1151 100644 --- a/Samples/3_CUDA_Features/bf16TensorCoreGemm/CMakeLists.txt +++ b/Samples/3_CUDA_Features/bf16TensorCoreGemm/CMakeLists.txt @@ -33,3 +33,7 @@ target_compile_options(bf16TensorCoreGemm PRIVATE $<$:--e target_compile_features(bf16TensorCoreGemm PRIVATE cxx_std_17 cuda_std_17) set_target_properties(bf16TensorCoreGemm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/binaryPartitionCG/CMakeLists.txt b/Samples/3_CUDA_Features/binaryPartitionCG/CMakeLists.txt index 7045500c..25c46b45 100644 --- a/Samples/3_CUDA_Features/binaryPartitionCG/CMakeLists.txt +++ b/Samples/3_CUDA_Features/binaryPartitionCG/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(binaryPartitionCG PRIVATE $<$:--ex target_compile_features(binaryPartitionCG PRIVATE cxx_std_17 cuda_std_17) set_target_properties(binaryPartitionCG PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt b/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt index bf2be94c..ee742504 100644 --- a/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt +++ b/Samples/3_CUDA_Features/bindlessTexture/CMakeLists.txt @@ -90,3 +90,7 @@ target_compile_features(bindlessTexture PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'bindlessTexture'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt b/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt index edbd7698..54de78a3 100644 --- a/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cdpAdvancedQuicksort/CMakeLists.txt @@ -38,3 +38,7 @@ target_compile_options(cdpAdvancedQuicksort PRIVATE $<$:- target_compile_features(cdpAdvancedQuicksort PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cdpAdvancedQuicksort PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cdpBezierTessellation/CMakeLists.txt b/Samples/3_CUDA_Features/cdpBezierTessellation/CMakeLists.txt index fec2f807..3eba90fa 100644 --- a/Samples/3_CUDA_Features/cdpBezierTessellation/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cdpBezierTessellation/CMakeLists.txt @@ -37,3 +37,7 @@ target_compile_options(cdpBezierTessellation PRIVATE $<$: target_compile_features(cdpBezierTessellation PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cdpBezierTessellation PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cdpQuadtree/CMakeLists.txt b/Samples/3_CUDA_Features/cdpQuadtree/CMakeLists.txt index 85fe0c8c..1ecbfac1 100644 --- a/Samples/3_CUDA_Features/cdpQuadtree/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cdpQuadtree/CMakeLists.txt @@ -37,3 +37,7 @@ target_compile_options(cdpQuadtree PRIVATE $<$:--extended target_compile_features(cdpQuadtree PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cdpQuadtree PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cdpSimplePrint/CMakeLists.txt b/Samples/3_CUDA_Features/cdpSimplePrint/CMakeLists.txt index 726a555d..00c42182 100644 --- a/Samples/3_CUDA_Features/cdpSimplePrint/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cdpSimplePrint/CMakeLists.txt @@ -37,3 +37,7 @@ target_compile_options(cdpSimplePrint PRIVATE $<$:--exten target_compile_features(cdpSimplePrint PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cdpSimplePrint PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cdpSimpleQuicksort/CMakeLists.txt b/Samples/3_CUDA_Features/cdpSimpleQuicksort/CMakeLists.txt index e6eabe4e..07ab4d6e 100644 --- a/Samples/3_CUDA_Features/cdpSimpleQuicksort/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cdpSimpleQuicksort/CMakeLists.txt @@ -37,3 +37,7 @@ target_compile_options(cdpSimpleQuicksort PRIVATE $<$:--e target_compile_features(cdpSimpleQuicksort PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cdpSimpleQuicksort PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cudaCompressibleMemory/CMakeLists.txt b/Samples/3_CUDA_Features/cudaCompressibleMemory/CMakeLists.txt index d0f72466..20416c6f 100644 --- a/Samples/3_CUDA_Features/cudaCompressibleMemory/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cudaCompressibleMemory/CMakeLists.txt @@ -36,3 +36,7 @@ target_include_directories(cudaCompressibleMemory PRIVATE target_link_libraries(cudaCompressibleMemory PRIVATE CUDA::cuda_driver ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/cudaTensorCoreGemm/CMakeLists.txt b/Samples/3_CUDA_Features/cudaTensorCoreGemm/CMakeLists.txt index d4505bab..fc5c0894 100644 --- a/Samples/3_CUDA_Features/cudaTensorCoreGemm/CMakeLists.txt +++ b/Samples/3_CUDA_Features/cudaTensorCoreGemm/CMakeLists.txt @@ -29,3 +29,7 @@ target_compile_options(cudaTensorCoreGemm PRIVATE $<$:--e target_compile_features(cudaTensorCoreGemm PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cudaTensorCoreGemm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/dmmaTensorCoreGemm/CMakeLists.txt b/Samples/3_CUDA_Features/dmmaTensorCoreGemm/CMakeLists.txt index cb94a68b..d3aa179c 100644 --- a/Samples/3_CUDA_Features/dmmaTensorCoreGemm/CMakeLists.txt +++ b/Samples/3_CUDA_Features/dmmaTensorCoreGemm/CMakeLists.txt @@ -35,3 +35,7 @@ target_compile_options(dmmaTensorCoreGemm PRIVATE $<$:--e target_compile_features(dmmaTensorCoreGemm PRIVATE cxx_std_17 cuda_std_17) set_target_properties(dmmaTensorCoreGemm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/globalToShmemAsyncCopy/CMakeLists.txt b/Samples/3_CUDA_Features/globalToShmemAsyncCopy/CMakeLists.txt index caf971b0..47abd5e0 100644 --- a/Samples/3_CUDA_Features/globalToShmemAsyncCopy/CMakeLists.txt +++ b/Samples/3_CUDA_Features/globalToShmemAsyncCopy/CMakeLists.txt @@ -35,3 +35,7 @@ target_compile_options(globalToShmemAsyncCopy PRIVATE $<$ target_compile_features(globalToShmemAsyncCopy PRIVATE cxx_std_17 cuda_std_17) set_target_properties(globalToShmemAsyncCopy PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/graphConditionalNodes/CMakeLists.txt b/Samples/3_CUDA_Features/graphConditionalNodes/CMakeLists.txt index 07ded88d..5e7cd329 100644 --- a/Samples/3_CUDA_Features/graphConditionalNodes/CMakeLists.txt +++ b/Samples/3_CUDA_Features/graphConditionalNodes/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(graphConditionalNodes PRIVATE $<$: target_compile_features(graphConditionalNodes PRIVATE cxx_std_17 cuda_std_17) set_target_properties(graphConditionalNodes PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/graphMemoryFootprint/CMakeLists.txt b/Samples/3_CUDA_Features/graphMemoryFootprint/CMakeLists.txt index 315f6aa3..29d206b9 100644 --- a/Samples/3_CUDA_Features/graphMemoryFootprint/CMakeLists.txt +++ b/Samples/3_CUDA_Features/graphMemoryFootprint/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(graphMemoryFootprint PRIVATE $<$:- target_compile_features(graphMemoryFootprint PRIVATE cxx_std_17 cuda_std_17) set_target_properties(graphMemoryFootprint PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/graphMemoryNodes/CMakeLists.txt b/Samples/3_CUDA_Features/graphMemoryNodes/CMakeLists.txt index f202923b..aeabc6bc 100644 --- a/Samples/3_CUDA_Features/graphMemoryNodes/CMakeLists.txt +++ b/Samples/3_CUDA_Features/graphMemoryNodes/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(graphMemoryNodes PRIVATE $<$:--ext target_compile_features(graphMemoryNodes PRIVATE cxx_std_17 cuda_std_17) set_target_properties(graphMemoryNodes PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/immaTensorCoreGemm/CMakeLists.txt b/Samples/3_CUDA_Features/immaTensorCoreGemm/CMakeLists.txt index bd31d4af..7d711938 100644 --- a/Samples/3_CUDA_Features/immaTensorCoreGemm/CMakeLists.txt +++ b/Samples/3_CUDA_Features/immaTensorCoreGemm/CMakeLists.txt @@ -29,3 +29,7 @@ target_compile_options(immaTensorCoreGemm PRIVATE $<$:--e target_compile_features(immaTensorCoreGemm PRIVATE cxx_std_17 cuda_std_17) set_target_properties(immaTensorCoreGemm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/jacobiCudaGraphs/CMakeLists.txt b/Samples/3_CUDA_Features/jacobiCudaGraphs/CMakeLists.txt index 84ad80d4..a39b81af 100644 --- a/Samples/3_CUDA_Features/jacobiCudaGraphs/CMakeLists.txt +++ b/Samples/3_CUDA_Features/jacobiCudaGraphs/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(jacobiCudaGraphs PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(jacobiCudaGraphs PRIVATE ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/memMapIPCDrv/CMakeLists.txt b/Samples/3_CUDA_Features/memMapIPCDrv/CMakeLists.txt index b57e9187..9856efbe 100644 --- a/Samples/3_CUDA_Features/memMapIPCDrv/CMakeLists.txt +++ b/Samples/3_CUDA_Features/memMapIPCDrv/CMakeLists.txt @@ -69,3 +69,7 @@ add_custom_target(generate_memMapIpc_ptx ALL DEPENDS ${CUDA_PTX_FILE}) # Ensure memMapIPCDrv depends on the fatbin add_dependencies(memMapIPCDrv generate_memMapIpc_ptx) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/newdelete/CMakeLists.txt b/Samples/3_CUDA_Features/newdelete/CMakeLists.txt index e361a5f6..4437a6d3 100644 --- a/Samples/3_CUDA_Features/newdelete/CMakeLists.txt +++ b/Samples/3_CUDA_Features/newdelete/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(newdelete PRIVATE $<$:--extended-l target_compile_features(newdelete PRIVATE cxx_std_17 cuda_std_17) set_target_properties(newdelete PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/ptxjit/CMakeLists.txt b/Samples/3_CUDA_Features/ptxjit/CMakeLists.txt index 575949b0..15ad74f5 100644 --- a/Samples/3_CUDA_Features/ptxjit/CMakeLists.txt +++ b/Samples/3_CUDA_Features/ptxjit/CMakeLists.txt @@ -62,3 +62,7 @@ add_custom_target(generate_ptxjit_ptx ALL DEPENDS ${CUDA_PTX_FILE}) # Ensure ptxjit depends on the fatbin add_dependencies(ptxjit generate_ptxjit_ptx) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/simpleCudaGraphs/CMakeLists.txt b/Samples/3_CUDA_Features/simpleCudaGraphs/CMakeLists.txt index 1f61707c..b6a18373 100644 --- a/Samples/3_CUDA_Features/simpleCudaGraphs/CMakeLists.txt +++ b/Samples/3_CUDA_Features/simpleCudaGraphs/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(simpleCudaGraphs PRIVATE $<$:--ext target_compile_features(simpleCudaGraphs PRIVATE cxx_std_17 cuda_std_17) set_target_properties(simpleCudaGraphs PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/tf32TensorCoreGemm/CMakeLists.txt b/Samples/3_CUDA_Features/tf32TensorCoreGemm/CMakeLists.txt index 084d52f5..6599a6ff 100644 --- a/Samples/3_CUDA_Features/tf32TensorCoreGemm/CMakeLists.txt +++ b/Samples/3_CUDA_Features/tf32TensorCoreGemm/CMakeLists.txt @@ -35,3 +35,7 @@ target_compile_options(tf32TensorCoreGemm PRIVATE $<$:--e target_compile_features(tf32TensorCoreGemm PRIVATE cxx_std_17 cuda_std_17) set_target_properties(tf32TensorCoreGemm PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/3_CUDA_Features/warpAggregatedAtomicsCG/CMakeLists.txt b/Samples/3_CUDA_Features/warpAggregatedAtomicsCG/CMakeLists.txt index d17465f7..e3046b34 100644 --- a/Samples/3_CUDA_Features/warpAggregatedAtomicsCG/CMakeLists.txt +++ b/Samples/3_CUDA_Features/warpAggregatedAtomicsCG/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(warpAggregatedAtomicsCG PRIVATE $<$:--extended target_compile_features(lineOfSight PRIVATE cxx_std_17 cuda_std_17) set_target_properties(lineOfSight PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/matrixMulCUBLAS/CMakeLists.txt b/Samples/4_CUDA_Libraries/matrixMulCUBLAS/CMakeLists.txt index 7edf4311..260cf239 100644 --- a/Samples/4_CUDA_Libraries/matrixMulCUBLAS/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/matrixMulCUBLAS/CMakeLists.txt @@ -37,3 +37,7 @@ target_link_libraries(matrixMulCUBLAS PRIVATE CUDA::cudart CUDA::cublas ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/nvJPEG/CMakeLists.txt b/Samples/4_CUDA_Libraries/nvJPEG/CMakeLists.txt index ab3f1fb9..215cc96e 100644 --- a/Samples/4_CUDA_Libraries/nvJPEG/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/nvJPEG/CMakeLists.txt @@ -44,3 +44,7 @@ add_custom_command(TARGET nvJPEG POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/images ${CMAKE_CURRENT_BINARY_DIR}/images ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/nvJPEG_encoder/CMakeLists.txt b/Samples/4_CUDA_Libraries/nvJPEG_encoder/CMakeLists.txt index a07fc77a..47ebb087 100644 --- a/Samples/4_CUDA_Libraries/nvJPEG_encoder/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/nvJPEG_encoder/CMakeLists.txt @@ -50,3 +50,7 @@ add_custom_command(TARGET nvJPEG_encoder POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/encode_output ${CMAKE_CURRENT_BINARY_DIR}/encode_output ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt b/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt index c0d8ceb7..99aa0e07 100644 --- a/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/oceanFFT/CMakeLists.txt @@ -93,3 +93,7 @@ target_compile_features(oceanFFT PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'oceanFFT'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt b/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt index 35ecc07e..635a2960 100644 --- a/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/randomFog/CMakeLists.txt @@ -111,3 +111,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'randomFog'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUBLAS/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUBLAS/CMakeLists.txt index 6c1b3e76..cc7f7149 100644 --- a/Samples/4_CUDA_Libraries/simpleCUBLAS/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUBLAS/CMakeLists.txt @@ -37,3 +37,7 @@ target_link_libraries(simpleCUBLAS PRIVATE CUDA::cudart CUDA::cublas ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUBLASXT/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUBLASXT/CMakeLists.txt index cf3ed66e..72d33680 100644 --- a/Samples/4_CUDA_Libraries/simpleCUBLASXT/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUBLASXT/CMakeLists.txt @@ -37,3 +37,7 @@ target_link_libraries(simpleCUBLASXT PRIVATE CUDA::cudart CUDA::cublas ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUBLAS_LU/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUBLAS_LU/CMakeLists.txt index 6df3d654..01f8c8a0 100644 --- a/Samples/4_CUDA_Libraries/simpleCUBLAS_LU/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUBLAS_LU/CMakeLists.txt @@ -37,3 +37,7 @@ target_link_libraries(simpleCUBLAS_LU PRIVATE CUDA::cudart CUDA::cublas ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUFFT/CMakeLists.txt index 5373206c..a3db2d0a 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUFFT/CMakeLists.txt @@ -37,3 +37,7 @@ set_target_properties(simpleCUFFT PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_link_libraries(simpleCUFFT PRIVATE CUDA::cufft ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT_2d_MGPU/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUFFT_2d_MGPU/CMakeLists.txt index 64783b2f..28d435f6 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT_2d_MGPU/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUFFT_2d_MGPU/CMakeLists.txt @@ -41,3 +41,7 @@ set_target_properties(simpleCUFFT_2d_MGPU PROPERTIES CUDA_SEPARABLE_COMPILATION target_link_libraries(simpleCUFFT_2d_MGPU PRIVATE CUDA::cufft ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT_MGPU/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUFFT_MGPU/CMakeLists.txt index 34aa1146..4f0f1aaa 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT_MGPU/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUFFT_MGPU/CMakeLists.txt @@ -37,3 +37,7 @@ set_target_properties(simpleCUFFT_MGPU PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_link_libraries(simpleCUFFT_MGPU PRIVATE CUDA::cufft ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt index 5676f904..341796e9 100644 --- a/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/simpleCUFFT_callback/CMakeLists.txt @@ -37,3 +37,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample simpleCUFFT_callback - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/4_CUDA_Libraries/watershedSegmentationNPP/CMakeLists.txt b/Samples/4_CUDA_Libraries/watershedSegmentationNPP/CMakeLists.txt index d9116f36..744a4920 100644 --- a/Samples/4_CUDA_Libraries/watershedSegmentationNPP/CMakeLists.txt +++ b/Samples/4_CUDA_Libraries/watershedSegmentationNPP/CMakeLists.txt @@ -65,3 +65,7 @@ add_custom_command(TARGET watershedSegmentationNPP POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/data/Rocks_512x512_8u_Gray.raw $/ ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/BlackScholes/CMakeLists.txt b/Samples/5_Domain_Specific/BlackScholes/CMakeLists.txt index 07bb26fb..01329a83 100644 --- a/Samples/5_Domain_Specific/BlackScholes/CMakeLists.txt +++ b/Samples/5_Domain_Specific/BlackScholes/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(BlackScholes PRIVATE $<$:--extende target_compile_features(BlackScholes PRIVATE cxx_std_17 cuda_std_17) set_target_properties(BlackScholes PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/BlackScholes_nvrtc/CMakeLists.txt b/Samples/5_Domain_Specific/BlackScholes_nvrtc/CMakeLists.txt index f2745669..eae3d403 100644 --- a/Samples/5_Domain_Specific/BlackScholes_nvrtc/CMakeLists.txt +++ b/Samples/5_Domain_Specific/BlackScholes_nvrtc/CMakeLists.txt @@ -39,3 +39,7 @@ add_custom_command(TARGET BlackScholes_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/BlackScholes_kernel.cuh ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/FDTD3d/CMakeLists.txt b/Samples/5_Domain_Specific/FDTD3d/CMakeLists.txt index f979400a..1a1d50b2 100644 --- a/Samples/5_Domain_Specific/FDTD3d/CMakeLists.txt +++ b/Samples/5_Domain_Specific/FDTD3d/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(FDTD3d PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(FDTD3d PRIVATE inc ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/HSOpticalFlow/CMakeLists.txt b/Samples/5_Domain_Specific/HSOpticalFlow/CMakeLists.txt index cef22b31..b80b2466 100644 --- a/Samples/5_Domain_Specific/HSOpticalFlow/CMakeLists.txt +++ b/Samples/5_Domain_Specific/HSOpticalFlow/CMakeLists.txt @@ -38,3 +38,7 @@ add_custom_command(TARGET HSOpticalFlow POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt b/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt index b8cfcfa3..4bfcc926 100644 --- a/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt +++ b/Samples/5_Domain_Specific/Mandelbrot/CMakeLists.txt @@ -90,3 +90,7 @@ target_compile_features(Mandelbrot PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'Mandelbrot'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/MonteCarloMultiGPU/CMakeLists.txt b/Samples/5_Domain_Specific/MonteCarloMultiGPU/CMakeLists.txt index 0df7a327..1c8522c7 100644 --- a/Samples/5_Domain_Specific/MonteCarloMultiGPU/CMakeLists.txt +++ b/Samples/5_Domain_Specific/MonteCarloMultiGPU/CMakeLists.txt @@ -36,3 +36,7 @@ target_include_directories(MonteCarloMultiGPU PRIVATE target_link_libraries(MonteCarloMultiGPU PRIVATE CUDA::curand ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/NV12toBGRandResize/CMakeLists.txt b/Samples/5_Domain_Specific/NV12toBGRandResize/CMakeLists.txt index 4559468c..765a82a6 100644 --- a/Samples/5_Domain_Specific/NV12toBGRandResize/CMakeLists.txt +++ b/Samples/5_Domain_Specific/NV12toBGRandResize/CMakeLists.txt @@ -38,3 +38,7 @@ add_custom_command(TARGET NV12toBGRandResize POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt b/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt index bc4f1848..31d1694f 100644 --- a/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt +++ b/Samples/5_Domain_Specific/SobelFilter/CMakeLists.txt @@ -89,3 +89,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'SobelFilter'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/SobolQRNG/CMakeLists.txt b/Samples/5_Domain_Specific/SobolQRNG/CMakeLists.txt index 5ce5817e..341c4f2d 100644 --- a/Samples/5_Domain_Specific/SobolQRNG/CMakeLists.txt +++ b/Samples/5_Domain_Specific/SobolQRNG/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(SobolQRNG PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(SobolQRNG PRIVATE ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt b/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt index b8c8aade..4e4f375b 100644 --- a/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt +++ b/Samples/5_Domain_Specific/bicubicTexture/CMakeLists.txt @@ -90,3 +90,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'bicubicTexture'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt b/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt index fe574eb6..94a8b1ca 100644 --- a/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt +++ b/Samples/5_Domain_Specific/bilateralFilter/CMakeLists.txt @@ -91,3 +91,7 @@ target_compile_features(bilateralFilter PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'bilateralFilter'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/binomialOptions/CMakeLists.txt b/Samples/5_Domain_Specific/binomialOptions/CMakeLists.txt index 5f49e7fc..63eaf820 100644 --- a/Samples/5_Domain_Specific/binomialOptions/CMakeLists.txt +++ b/Samples/5_Domain_Specific/binomialOptions/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(binomialOptions PROPERTIES CUDA_SEPARABLE_COMPILATION ON) target_include_directories(binomialOptions PUBLIC ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/binomialOptions_nvrtc/CMakeLists.txt b/Samples/5_Domain_Specific/binomialOptions_nvrtc/CMakeLists.txt index b48e71e0..dcde9f41 100644 --- a/Samples/5_Domain_Specific/binomialOptions_nvrtc/CMakeLists.txt +++ b/Samples/5_Domain_Specific/binomialOptions_nvrtc/CMakeLists.txt @@ -57,3 +57,7 @@ add_custom_command(TARGET binomialOptions_nvrtc POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/realtype.h ${CMAKE_CURRENT_BINARY_DIR} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/convolutionFFT2D/CMakeLists.txt b/Samples/5_Domain_Specific/convolutionFFT2D/CMakeLists.txt index d734b34f..4e61664f 100644 --- a/Samples/5_Domain_Specific/convolutionFFT2D/CMakeLists.txt +++ b/Samples/5_Domain_Specific/convolutionFFT2D/CMakeLists.txt @@ -36,3 +36,7 @@ target_include_directories(convolutionFFT2D PRIVATE target_link_libraries(convolutionFFT2D PUBLIC CUDA::cufft ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/dwtHaar1D/CMakeLists.txt b/Samples/5_Domain_Specific/dwtHaar1D/CMakeLists.txt index d69c75a0..0e1bfdbf 100644 --- a/Samples/5_Domain_Specific/dwtHaar1D/CMakeLists.txt +++ b/Samples/5_Domain_Specific/dwtHaar1D/CMakeLists.txt @@ -34,3 +34,7 @@ add_custom_command(TARGET dwtHaar1D POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/dxtc/CMakeLists.txt b/Samples/5_Domain_Specific/dxtc/CMakeLists.txt index e5e633fc..90b336ba 100644 --- a/Samples/5_Domain_Specific/dxtc/CMakeLists.txt +++ b/Samples/5_Domain_Specific/dxtc/CMakeLists.txt @@ -34,3 +34,7 @@ add_custom_command(TARGET dxtc POST_BUILD ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/fastWalshTransform/CMakeLists.txt b/Samples/5_Domain_Specific/fastWalshTransform/CMakeLists.txt index 285f5d75..d893e7a3 100644 --- a/Samples/5_Domain_Specific/fastWalshTransform/CMakeLists.txt +++ b/Samples/5_Domain_Specific/fastWalshTransform/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(fastWalshTransform PRIVATE $<$:--e target_compile_features(fastWalshTransform PRIVATE cxx_std_17 cuda_std_17) set_target_properties(fastWalshTransform PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt b/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt index 2a30ef43..b9e70239 100644 --- a/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt +++ b/Samples/5_Domain_Specific/fluidsGL/CMakeLists.txt @@ -91,3 +91,7 @@ target_compile_features(fluidsGL PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'fluidsGL'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/marchingCubes/CMakeLists.txt b/Samples/5_Domain_Specific/marchingCubes/CMakeLists.txt index e38e19c5..7970b60b 100644 --- a/Samples/5_Domain_Specific/marchingCubes/CMakeLists.txt +++ b/Samples/5_Domain_Specific/marchingCubes/CMakeLists.txt @@ -84,3 +84,7 @@ target_compile_features(marchingCubes PRIVATE cxx_std_17 cuda_std_17) else() message(STATUS "OpenGL not found - will not build sample 'marchingCubes'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/nbody/CMakeLists.txt b/Samples/5_Domain_Specific/nbody/CMakeLists.txt index 8b748611..e8ff90a3 100644 --- a/Samples/5_Domain_Specific/nbody/CMakeLists.txt +++ b/Samples/5_Domain_Specific/nbody/CMakeLists.txt @@ -83,3 +83,7 @@ if(${OpenGL_FOUND}) else() message(STATUS "OpenGL not found - will not build sample 'nbody'") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/5_Domain_Specific/p2pBandwidthLatencyTest/CMakeLists.txt b/Samples/5_Domain_Specific/p2pBandwidthLatencyTest/CMakeLists.txt index c33cbceb..0f60b103 100644 --- a/Samples/5_Domain_Specific/p2pBandwidthLatencyTest/CMakeLists.txt +++ b/Samples/5_Domain_Specific/p2pBandwidthLatencyTest/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(p2pBandwidthLatencyTest PRIVATE $<$:- target_compile_features(LargeKernelParameter PRIVATE cxx_std_17 cuda_std_17) set_target_properties(LargeKernelParameter PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/6_Performance/UnifiedMemoryPerf/CMakeLists.txt b/Samples/6_Performance/UnifiedMemoryPerf/CMakeLists.txt index fc242dd3..9ebabf27 100644 --- a/Samples/6_Performance/UnifiedMemoryPerf/CMakeLists.txt +++ b/Samples/6_Performance/UnifiedMemoryPerf/CMakeLists.txt @@ -32,3 +32,7 @@ set_target_properties(UnifiedMemoryPerf PROPERTIES CUDA_SEPARABLE_COMPILATION ON target_include_directories(UnifiedMemoryPerf PRIVATE ${CUDAToolkit_INCLUDE_DIRS} ) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/6_Performance/alignedTypes/CMakeLists.txt b/Samples/6_Performance/alignedTypes/CMakeLists.txt index 32592218..fc74c459 100644 --- a/Samples/6_Performance/alignedTypes/CMakeLists.txt +++ b/Samples/6_Performance/alignedTypes/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(alignedTypes PRIVATE $<$:--extende target_compile_features(alignedTypes PRIVATE cxx_std_17 cuda_std_17) set_target_properties(alignedTypes PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/6_Performance/cudaGraphsPerfScaling/CMakeLists.txt b/Samples/6_Performance/cudaGraphsPerfScaling/CMakeLists.txt index 3ac8c997..0a89460c 100644 --- a/Samples/6_Performance/cudaGraphsPerfScaling/CMakeLists.txt +++ b/Samples/6_Performance/cudaGraphsPerfScaling/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(cudaGraphsPerfScaling PRIVATE $<$: target_compile_features(cudaGraphsPerfScaling PRIVATE cxx_std_17 cuda_std_17) set_target_properties(cudaGraphsPerfScaling PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/6_Performance/transpose/CMakeLists.txt b/Samples/6_Performance/transpose/CMakeLists.txt index 38c5b502..5c92d03c 100644 --- a/Samples/6_Performance/transpose/CMakeLists.txt +++ b/Samples/6_Performance/transpose/CMakeLists.txt @@ -28,3 +28,7 @@ target_compile_options(transpose PRIVATE $<$:--extended-l target_compile_features(transpose PRIVATE cxx_std_17 cuda_std_17) set_target_properties(transpose PROPERTIES CUDA_SEPARABLE_COMPILATION ON) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/7_libNVVM/CMakeLists.txt b/Samples/7_libNVVM/CMakeLists.txt index 08310559..bfded12a 100644 --- a/Samples/7_libNVVM/CMakeLists.txt +++ b/Samples/7_libNVVM/CMakeLists.txt @@ -128,3 +128,8 @@ add_subdirectory(simple) add_subdirectory(syscalls) add_subdirectory(ptxgen) add_subdirectory(uvmlite) + +# Include InstallSamples to set CUDA_SAMPLES_INSTALL_DIR +# libNVVM samples will use this variable for installation +list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../cmake") +include(InstallSamples) diff --git a/Samples/7_libNVVM/cuda-c-linking/CMakeLists.txt b/Samples/7_libNVVM/cuda-c-linking/CMakeLists.txt index 0a6dea2e..719b17d1 100644 --- a/Samples/7_libNVVM/cuda-c-linking/CMakeLists.txt +++ b/Samples/7_libNVVM/cuda-c-linking/CMakeLists.txt @@ -80,7 +80,13 @@ add_library(mathfuncs64 STATIC math-funcs.cu) set_target_properties(mathfuncs64 PROPERTIES PREFIX "lib" OUTPUT_NAME "mathfuncs64" SUFFIX ".a" CUDA_SEPERABLE_COMPILATION ON) -install(TARGETS cuda-c-linking mathfuncs64 DESTINATION bin) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(TARGETS cuda-c-linking mathfuncs64 DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) +else() + install(TARGETS cuda-c-linking mathfuncs64 DESTINATION bin) +endif() if (WIN32) add_custom_command( diff --git a/Samples/7_libNVVM/cuda-shared-memory/CMakeLists.txt b/Samples/7_libNVVM/cuda-shared-memory/CMakeLists.txt index 5fff48de..9b11eec3 100644 --- a/Samples/7_libNVVM/cuda-shared-memory/CMakeLists.txt +++ b/Samples/7_libNVVM/cuda-shared-memory/CMakeLists.txt @@ -39,9 +39,15 @@ set_tests_properties(test-cuda-shared-memory-shared_memory test-cuda-shared-memory-extern_shared_memory PROPERTIES FIXTURES_REQUIRED PTXGENTEST) -# Install the .ll files to the install/ folder -install(FILES shared_memory.ll DESTINATION bin/cuda-shared-memory) -install(FILES extern_shared_memory.ll DESTINATION bin/cuda-shared-memory) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin/cuda-shared-memory (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(FILES shared_memory.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}/cuda-shared-memory) + install(FILES extern_shared_memory.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}/cuda-shared-memory) +else() + install(FILES shared_memory.ll DESTINATION bin/cuda-shared-memory) + install(FILES extern_shared_memory.ll DESTINATION bin/cuda-shared-memory) +endif() file(COPY shared_memory.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") file(COPY extern_shared_memory.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/Samples/7_libNVVM/device-side-launch/CMakeLists.txt b/Samples/7_libNVVM/device-side-launch/CMakeLists.txt index 4617fab3..fafae9cd 100644 --- a/Samples/7_libNVVM/device-side-launch/CMakeLists.txt +++ b/Samples/7_libNVVM/device-side-launch/CMakeLists.txt @@ -41,8 +41,15 @@ else (WIN32) set_target_properties(dsl PROPERTIES LINK_FLAGS "-Wl,-rpath,${LIBNVVM_RPATH}") endif (WIN32) -install(TARGETS dsl DESTINATION bin) -install(FILES dsl-gpu64.ll DESTINATION bin) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(TARGETS dsl DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) + install(FILES dsl-gpu64.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) +else() + install(TARGETS dsl DESTINATION bin) + install(FILES dsl-gpu64.ll DESTINATION bin) +endif() # 'dsl' will load dsl-gpu64.ll from the current working directory. That # .ll file should be present where tests are executed (the build directory). diff --git a/Samples/7_libNVVM/ptxgen/CMakeLists.txt b/Samples/7_libNVVM/ptxgen/CMakeLists.txt index 952f451f..9170003c 100644 --- a/Samples/7_libNVVM/ptxgen/CMakeLists.txt +++ b/Samples/7_libNVVM/ptxgen/CMakeLists.txt @@ -48,8 +48,15 @@ else (WIN32) LINK_FLAGS "-Wl,-rpath,${LIBNVVM_RPATH}") endif (WIN32) -install(TARGETS ptxgen DESTINATION bin) -install(FILES test.ll DESTINATION bin) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(TARGETS ptxgen DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) + install(FILES test.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) +else() + install(TARGETS ptxgen DESTINATION bin) + install(FILES test.ll DESTINATION bin) +endif() add_custom_command( TARGET ptxgen diff --git a/Samples/7_libNVVM/simple/CMakeLists.txt b/Samples/7_libNVVM/simple/CMakeLists.txt index 16331e6b..384838f8 100644 --- a/Samples/7_libNVVM/simple/CMakeLists.txt +++ b/Samples/7_libNVVM/simple/CMakeLists.txt @@ -40,8 +40,15 @@ else (WIN32) LINK_FLAGS "-Wl,-rpath,${LIBNVVM_RPATH}") endif (WIN32) -install(TARGETS simple DESTINATION bin) -install(FILES simple-gpu64.ll DESTINATION bin) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(TARGETS simple DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) + install(FILES simple-gpu64.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) +else() + install(TARGETS simple DESTINATION bin) + install(FILES simple-gpu64.ll DESTINATION bin) +endif() # 'simple' will load simple-gpu64.ll from the current working directory. That # .ll file should be present where tests are executed (the build directory). diff --git a/Samples/7_libNVVM/syscalls/CMakeLists.txt b/Samples/7_libNVVM/syscalls/CMakeLists.txt index 3186d9b5..f5f8993b 100644 --- a/Samples/7_libNVVM/syscalls/CMakeLists.txt +++ b/Samples/7_libNVVM/syscalls/CMakeLists.txt @@ -36,8 +36,15 @@ add_test(NAME test-syscalls-vprintf set_tests_properties(test-syscalls-vprintf test-syscalls-malloc-free PROPERTIES FIXTURES_REQUIRED PTXGENTEST) -install(FILES malloc-free.ll DESTINATION bin/syscalls) -install(FILES vprintf.ll DESTINATION bin/syscalls) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin/syscalls (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(FILES malloc-free.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}/syscalls) + install(FILES vprintf.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}/syscalls) +else() + install(FILES malloc-free.ll DESTINATION bin/syscalls) + install(FILES vprintf.ll DESTINATION bin/syscalls) +endif() file(COPY malloc-free.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") file(COPY vprintf.ll DESTINATION "${CMAKE_CURRENT_BINARY_DIR}") diff --git a/Samples/7_libNVVM/uvmlite/CMakeLists.txt b/Samples/7_libNVVM/uvmlite/CMakeLists.txt index 0ed6e969..c8ba5cdd 100644 --- a/Samples/7_libNVVM/uvmlite/CMakeLists.txt +++ b/Samples/7_libNVVM/uvmlite/CMakeLists.txt @@ -44,8 +44,15 @@ else (WIN32) LINK_FLAGS "-Wl,-rpath,${LIBNVVM_RPATH}") endif () -install(TARGETS uvmlite DESTINATION bin) -install(FILES uvmlite64.ll DESTINATION bin) +# Install to CUDA_SAMPLES_INSTALL_DIR if defined (for unified installation), +# otherwise install to bin (for standalone libNVVM build) +if(DEFINED CUDA_SAMPLES_INSTALL_DIR) + install(TARGETS uvmlite DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) + install(FILES uvmlite64.ll DESTINATION ${CUDA_SAMPLES_INSTALL_DIR}) +else() + install(TARGETS uvmlite DESTINATION bin) + install(FILES uvmlite64.ll DESTINATION bin) +endif() # 'uvmlite' will load uvmlite64.ll from the current working directory. That # .ll file should be present where tests are executed (the build directory). diff --git a/Samples/8_Platform_Specific/Tegra/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/CMakeLists.txt index 356c2a13..fb976832 100644 --- a/Samples/8_Platform_Specific/Tegra/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/CMakeLists.txt @@ -10,3 +10,7 @@ add_subdirectory(fluidsGLES) add_subdirectory(nbody_opengles) add_subdirectory(simpleGLES) add_subdirectory(simpleGLES_EGLOutput) + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/EGLSync_CUDAEvent_Interop/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/EGLSync_CUDAEvent_Interop/CMakeLists.txt index b75b8356..32b2a0be 100644 --- a/Samples/8_Platform_Specific/Tegra/EGLSync_CUDAEvent_Interop/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/EGLSync_CUDAEvent_Interop/CMakeLists.txt @@ -64,3 +64,7 @@ else() message(STATUS "Will not build sample EGLSync_CUDAEvent_Interop - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cuDLAErrorReporting/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cuDLAErrorReporting/CMakeLists.txt index 69107ced..10580406 100644 --- a/Samples/8_Platform_Specific/Tegra/cuDLAErrorReporting/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cuDLAErrorReporting/CMakeLists.txt @@ -47,3 +47,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cuDLAErrorReporting - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cuDLAHybridMode/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cuDLAHybridMode/CMakeLists.txt index cc4b2a4e..b0dab5ca 100644 --- a/Samples/8_Platform_Specific/Tegra/cuDLAHybridMode/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cuDLAHybridMode/CMakeLists.txt @@ -47,3 +47,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cuDLAHybridMode - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsHybrid/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsHybrid/CMakeLists.txt index 59873278..be17b563 100644 --- a/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsHybrid/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsHybrid/CMakeLists.txt @@ -47,3 +47,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cuDLALayerwiseStatsHybrid - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsStandalone/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsStandalone/CMakeLists.txt index 6781a02e..8d7eee3a 100644 --- a/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsStandalone/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cuDLALayerwiseStatsStandalone/CMakeLists.txt @@ -54,3 +54,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cuDLALayerwiseStatsStandalone - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cuDLAStandaloneMode/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cuDLAStandaloneMode/CMakeLists.txt index e8279495..86b3ffed 100644 --- a/Samples/8_Platform_Specific/Tegra/cuDLAStandaloneMode/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cuDLAStandaloneMode/CMakeLists.txt @@ -54,3 +54,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cuDLAStandaloneMode - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cudaNvSciBufMultiplanar/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cudaNvSciBufMultiplanar/CMakeLists.txt index fa04e68f..b6708b16 100644 --- a/Samples/8_Platform_Specific/Tegra/cudaNvSciBufMultiplanar/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cudaNvSciBufMultiplanar/CMakeLists.txt @@ -58,3 +58,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cudaNvSciBufMultiplanar - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/cudaNvSciNvMedia/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/cudaNvSciNvMedia/CMakeLists.txt index 03f82c00..b043622f 100644 --- a/Samples/8_Platform_Specific/Tegra/cudaNvSciNvMedia/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/cudaNvSciNvMedia/CMakeLists.txt @@ -89,3 +89,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample cudaNvSciNvMedia - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt index ede94814..9f04ae7a 100644 --- a/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/fluidsGLES/CMakeLists.txt @@ -70,3 +70,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample fluidsGLES - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/nbody_opengles/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/nbody_opengles/CMakeLists.txt index 842c920b..d55101c5 100644 --- a/Samples/8_Platform_Specific/Tegra/nbody_opengles/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/nbody_opengles/CMakeLists.txt @@ -61,3 +61,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample nbody_opengles - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt index f2c99c5f..3d88898b 100644 --- a/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/simpleGLES/CMakeLists.txt @@ -70,3 +70,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample simpleGLES - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt b/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt index 8a252ac5..7c362e1d 100644 --- a/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt +++ b/Samples/8_Platform_Specific/Tegra/simpleGLES_EGLOutput/CMakeLists.txt @@ -76,3 +76,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") else() message(STATUS "Will not build sample simpleGLES_EGLOutput - requires Linux OS") endif() + +# Include installation configuration +include(${CMAKE_CURRENT_SOURCE_DIR}/../../../../cmake/InstallSamples.cmake) +setup_samples_install() diff --git a/cmake/InstallSamples.cmake b/cmake/InstallSamples.cmake index 98e16605..fc4b2c7e 100644 --- a/cmake/InstallSamples.cmake +++ b/cmake/InstallSamples.cmake @@ -47,14 +47,17 @@ endif() # Create the installation path: bin/$(TARGET_ARCH)/$(TARGET_OS)/$(BUILD_TYPE) set(CUDA_SAMPLES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${TARGET_ARCH}/${TARGET_OS}/${BUILD_TYPE_LOWER}" CACHE PATH "Installation directory for CUDA samples") -# Print installation configuration -message(STATUS "CUDA Samples installation configured:") -message(STATUS " Architecture: ${TARGET_ARCH}") -message(STATUS " OS: ${TARGET_OS}") -message(STATUS " Build Type: ${BUILD_TYPE_LOWER}") -message(STATUS " Install Directory: ${CUDA_SAMPLES_INSTALL_DIR}") +# Print installation configuration only once +if(NOT CUDA_SAMPLES_INSTALL_CONFIG_PRINTED) + message(STATUS "CUDA Samples installation configured:") + message(STATUS " Architecture: ${TARGET_ARCH}") + message(STATUS " OS: ${TARGET_OS}") + message(STATUS " Build Type: ${BUILD_TYPE_LOWER}") + message(STATUS " Install Directory: ${CUDA_SAMPLES_INSTALL_DIR}") + set(CUDA_SAMPLES_INSTALL_CONFIG_PRINTED TRUE CACHE INTERNAL "Installation config printed flag") +endif() -# Function to setup installation for the project +# Function to setup installation for regular samples # This should be called after all targets are defined function(setup_samples_install) # Create an install script that will copy executables and specific file types @@ -63,10 +66,32 @@ function(setup_samples_install) # - run_tests.py automatically tries flattened paths as fallback # This script runs at install time, after the build is complete install(CODE " - file(GLOB_RECURSE SAMPLE_FILES + + # Search in the current project's binary directory for built executables + file(GLOB_RECURSE BINARY_FILES LIST_DIRECTORIES false - \"${CMAKE_BINARY_DIR}/Samples/*/*\" - \"${CMAKE_BINARY_DIR}/Samples/*/*/*\") + \"${CMAKE_CURRENT_BINARY_DIR}/*\") + + # Copy data files from sample's own data directory + file(GLOB_RECURSE SAMPLE_DATA_FILES + LIST_DIRECTORIES false + \"${CMAKE_CURRENT_SOURCE_DIR}/data/*\") + + # Copy shared data files from Common/data directory + # Try both paths: ../../../Common (for regular samples) and ../../../../Common (for Tegra) + set(COMMON_DATA_FILES \"\") + if(EXISTS \"${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/data\") + file(GLOB_RECURSE COMMON_DATA_FILES + LIST_DIRECTORIES false + \"${CMAKE_CURRENT_SOURCE_DIR}/../../../Common/data/*\") + elseif(EXISTS \"${CMAKE_CURRENT_SOURCE_DIR}/../../../../Common/data\") + file(GLOB_RECURSE COMMON_DATA_FILES + LIST_DIRECTORIES false + \"${CMAKE_CURRENT_SOURCE_DIR}/../../../../Common/data/*\") + endif() + + # Combine all lists + set(SAMPLE_FILES \${BINARY_FILES} \${SAMPLE_DATA_FILES} \${COMMON_DATA_FILES}) # Filter to include executable files and specific file types foreach(SAMPLE_FILE IN LISTS SAMPLE_FILES) @@ -82,27 +107,20 @@ function(setup_samples_install) NOT SAMPLE_NAME MATCHES \"^(Makefile|cmake_install\\\\.cmake)$\" AND NOT \"\${SAMPLE_FILE}\" MATCHES \"/CMakeFiles/\") - # Determine file type and whether to install - set(IS_EXECUTABLE FALSE) - set(IS_INTERMEDIATE_FILE FALSE) - - # Check if file has required extension (fatbin, ptx, bc, raw, ppm) + # Check if file has required extension (fatbin, ptx, bc, raw, ppm) or is executable if(SAMPLE_EXT MATCHES \"\\\\.(fatbin|ptx|bc|raw|ppm)$\") set(SHOULD_INSTALL TRUE) - set(IS_INTERMEDIATE_FILE TRUE) else() # Check if file is executable if(IS_SYMLINK \"\${SAMPLE_FILE}\" OR (EXISTS \"\${SAMPLE_FILE}\" AND NOT IS_DIRECTORY \"\${SAMPLE_FILE}\")) execute_process( COMMAND test -x \"\${SAMPLE_FILE}\" - RESULT_VARIABLE HAS_EXEC_BIT + RESULT_VARIABLE IS_EXEC OUTPUT_QUIET ERROR_QUIET ) - - if(HAS_EXEC_BIT EQUAL 0) + if(IS_EXEC EQUAL 0) set(SHOULD_INSTALL TRUE) - set(IS_EXECUTABLE TRUE) endif() endif() endif() @@ -110,59 +128,36 @@ function(setup_samples_install) if(SHOULD_INSTALL) get_filename_component(FILE_NAME \"\${SAMPLE_FILE}\" NAME) + set(DEST_FILE \"${CUDA_SAMPLES_INSTALL_DIR}/\${FILE_NAME}\") - if(IS_EXECUTABLE) - # Executables: install to flat directory for easy access - # run_tests.py will handle finding data files via flattened paths - message(STATUS \"Installing: ${CUDA_SAMPLES_INSTALL_DIR}/\${FILE_NAME}\") + # Check if file is executable + execute_process( + COMMAND test -x \"\${SAMPLE_FILE}\" + RESULT_VARIABLE HAS_EXEC_BIT + OUTPUT_QUIET ERROR_QUIET + ) + + get_filename_component(DEST_DIR \"\${DEST_FILE}\" DIRECTORY) + + if(HAS_EXEC_BIT EQUAL 0) + # File is executable - copy with execute permissions + message(STATUS \"Installing executable: \${DEST_FILE}\") file(COPY \"\${SAMPLE_FILE}\" - DESTINATION \"${CUDA_SAMPLES_INSTALL_DIR}\" + DESTINATION \"\${DEST_DIR}\" FILE_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) else() - # Data/intermediate files: preserve subdirectory structure (no execute bit) - # This maintains original relative paths for compatibility - # file(RELATIVE_PATH REL_PATH \"${CMAKE_BINARY_DIR}/Samples\" \"\${SAMPLE_FILE}\") - # get_filename_component(REL_DIR \"\${REL_PATH}\" DIRECTORY) - # set(DEST_DIR \"${CUDA_SAMPLES_INSTALL_DIR}/\${REL_DIR}\") - message(STATUS \"Installing: ${CUDA_SAMPLES_INSTALL_DIR}/\${FILE_NAME}\") + # Regular file - copy without execute permissions + message(STATUS \"Installing data file: \${DEST_FILE}\") file(COPY \"\${SAMPLE_FILE}\" - DESTINATION \"${CUDA_SAMPLES_INSTALL_DIR}\" + DESTINATION \"\${DEST_DIR}\" FILE_PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ - WORLD_READ) + WORLD_READ) endif() endif() endif() endforeach() - - # Copy everything from bin/bin (created by libNVVM samples install) - # The libNVVM samples install their .ll and data files to bin/bin - # Skip files that already exist (e.g., executable files already copied above) - set(BIN_BIN_DIR \"${CMAKE_BINARY_DIR}/bin/bin\") - if(EXISTS \"\${BIN_BIN_DIR}\" AND IS_DIRECTORY \"\${BIN_BIN_DIR}\") - file(GLOB_RECURSE BIN_BIN_FILES - RELATIVE \"\${BIN_BIN_DIR}\" - \"\${BIN_BIN_DIR}/*\") - foreach(REL_FILE IN LISTS BIN_BIN_FILES) - set(SRC_FILE \"\${BIN_BIN_DIR}/\${REL_FILE}\") - set(DEST_FILE \"${CUDA_SAMPLES_INSTALL_DIR}/\${REL_FILE}\") - - # Only copy if destination doesn't exist (avoid duplicate executables) - if(NOT EXISTS \"\${DEST_FILE}\") - get_filename_component(DEST_DIR \"\${DEST_FILE}\" DIRECTORY) - message(STATUS \"Installing from bin/bin: \${DEST_FILE}\") - file(COPY \"\${SRC_FILE}\" - DESTINATION \"\${DEST_DIR}\" - USE_SOURCE_PERMISSIONS) - endif() - endforeach() - - # Remove bin/bin after copying - message(STATUS \"Removing bin/bin directory\") - file(REMOVE_RECURSE \"\${BIN_BIN_DIR}\") - endif() ") endfunction() -