Hi: I’m using OptiX 7.0.0 and I’ve encountered a bug in the CMake provided with the SDK (specifically SDK/CMake/FindCUDA/select_compute_arch.cmake). This CMakeLists.txt:
project( example )
cmake_minimum_required( VERSION 3.14 )
set( OptiX_INSTALL_DIR "c:/ProgramData/NVIDIA Corporation/OptiX SDK 7.0.0" CACHE PATH "Path to OptiX installation" )
set( CMAKE_MODULE_PATH "${OptiX_INSTALL_DIR}/SDK/CMake" )
find_package( CUDA REQUIRED )
cuda_select_nvcc_arch_flags( arches )
produces a long string of error messages from cuda_select_arch_flags on windows (VS2017)) when the project is initially configured. Seems to work OK on linux, though.
At least as of CMake 3.16, the standard CMake-provided CUDA cuda_select_nvcc_arch_flags function works OK on both windows and linux, so I guess the FindCUDA provided with OptiX 7.0.0 is somewhat out of data.
Thanks,
Allen