summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Configure/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-17 18:56:40 (GMT)
committerBrad King <brad.king@kitware.com>2013-07-17 19:40:44 (GMT)
commit4dc4018553856fb2dae47ea608b8a09221b155fa (patch)
treeaec2968c185cf5ace330b5d603cc7175b985661a /Tests/RunCMake/Configure/RunCMakeTest.cmake
parentf82c751d7b3ee3907d780060985a36bdddcabad3 (diff)
downloadCMake-4dc4018553856fb2dae47ea608b8a09221b155fa.zip
CMake-4dc4018553856fb2dae47ea608b8a09221b155fa.tar.gz
CMake-4dc4018553856fb2dae47ea608b8a09221b155fa.tar.bz2
Teach compiler ABI check to tolerate try_compile COPY_FILE failure
In CMakeDetermineCompilerABI we use try_compile with the COPY_FILE option to get a copy of the compiled binary used to detect the ABI information. We already tolerate the case when compilation fails. However, when compilation appears to succeed but does not produce the expected executable the try_compile command immediately reports an error because the COPY_FILE fails. Tolerate COPY_FILE failure without stopping the overall configuration process by using the try_compile COPY_FILE_ERROR option to capture the error message. Log the full error to CMakeError.log and simply report failure to detect the ABI as if compilation had failed. Teach the RunCMake.Configure test to cover this case and verify that the messages show up as expected both in stdout and in CMakeError.log.
Diffstat (limited to 'Tests/RunCMake/Configure/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/Configure/RunCMakeTest.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/Tests/RunCMake/Configure/RunCMakeTest.cmake b/Tests/RunCMake/Configure/RunCMakeTest.cmake
index 46f9184..79e4060 100644
--- a/Tests/RunCMake/Configure/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Configure/RunCMakeTest.cmake
@@ -1,3 +1,4 @@
include(RunCMake)
run_cmake(ErrorLogs)
+run_cmake(FailCopyFileABI)