summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeTestCSharpCompiler.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeTestCSharpCompiler.cmake')
-rw-r--r--Modules/CMakeTestCSharpCompiler.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeTestCSharpCompiler.cmake b/Modules/CMakeTestCSharpCompiler.cmake
index 1119a45..adea250 100644
--- a/Modules/CMakeTestCSharpCompiler.cmake
+++ b/Modules/CMakeTestCSharpCompiler.cmake
@@ -30,6 +30,9 @@ if(NOT CMAKE_CSharp_COMPILER_WORKS)
" }"
"}"
)
+ # Clear result from normal variable.
+ unset(CMAKE_CSharp_COMPILER_WORKS)
+ # Puts test result in cache variable.
try_compile(CMAKE_CSharp_COMPILER_WORKS ${CMAKE_BINARY_DIR} "${test_compile_file}"
OUTPUT_VARIABLE __CMAKE_CSharp_COMPILER_OUTPUT
)