CUDA: CMP0104 causes try_compile to fail
Starting with commit 7934352e CMP0104 kicks in and causes try_compile to fail, so even a configuration run is not possible. My test run:
/home/alex/test/build# cmake -G Ninja ..
-- The CXX compiler identification is GNU 7.5.0
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting CUDA compiler ABI info
CMake Error in /home/alex/test/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
CUDA_ARCHITECTURES is empty for target "cmTC_a95fb".
CMake Error in /home/alex/test/build/CMakeFiles/CMakeTmp/CMakeLists.txt:
CUDA_ARCHITECTURES is empty for target "cmTC_a95fb".
CMake Error at /home/alex/cmake/Modules/CMakeDetermineCompilerABI.cmake:48 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
/home/alex/cmake/Modules/CMakeTestCUDACompiler.cmake:19 (CMAKE_DETERMINE_COMPILER_ABI)
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/home/alex/test/build/CMakeFiles/CMakeOutput.log".
I can't and don't want to set {CMAKE_}CUDA_ARCHITECTURES
at this stage as it will be set depending on several other settings determined during CMake run.