summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeTestCUDACompiler.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeTestCUDACompiler.cmake')
-rw-r--r--Modules/CMakeTestCUDACompiler.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeTestCUDACompiler.cmake b/Modules/CMakeTestCUDACompiler.cmake
index a18947b..25a3653 100644
--- a/Modules/CMakeTestCUDACompiler.cmake
+++ b/Modules/CMakeTestCUDACompiler.cmake
@@ -36,6 +36,10 @@ if(NOT CMAKE_CUDA_COMPILER_WORKS)
"#endif\n"
"int main(){return 0;}\n")
+ # Clear result from normal variable.
+ unset(CMAKE_CUDA_COMPILER_WORKS)
+
+ # Puts test result in cache variable.
try_compile(CMAKE_CUDA_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/main.cu
OUTPUT_VARIABLE __CMAKE_CUDA_COMPILER_OUTPUT)