diff options
Diffstat (limited to 'Modules/CMakeTestOBJCXXCompiler.cmake')
-rw-r--r-- | Modules/CMakeTestOBJCXXCompiler.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeTestOBJCXXCompiler.cmake b/Modules/CMakeTestOBJCXXCompiler.cmake index 36e3efc..4f7185f 100644 --- a/Modules/CMakeTestOBJCXXCompiler.cmake +++ b/Modules/CMakeTestOBJCXXCompiler.cmake @@ -46,6 +46,9 @@ if(NOT CMAKE_OBJCXX_COMPILER_WORKS) "# error \"The CMAKE_OBJCXX_COMPILER is not an Objective-C++ compiler\"\n" "#endif\n" "int main(){return 0;}\n") + # Clear result from normal variable. + unset(CMAKE_OBJCXX_COMPILER_WORKS) + # Puts test result in cache variable. try_compile(CMAKE_OBJCXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testOBJCXXCompiler.mm OUTPUT_VARIABLE __CMAKE_OBJCXX_COMPILER_OUTPUT) |