Print out the try_compile output for tests expected to fail.
authorStephen Kelly <stephen.kelly@kdab.com>
Tue, 21 Feb 2012 11:40:38 +0000 (12:40 +0100)
committerQt by Nokia <qt-info@nokia.com>
Tue, 21 Feb 2012 17:58:47 +0000 (18:58 +0100)
This way, ctest -V shows that it fails for the expected reason.

Change-Id: I97589d4e90d889ea0b10dbd6192526712dbfdd8e
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
tests/manual/cmake/CMakeLists.txt

index 7ec3ceb..930936a 100644 (file)
@@ -59,7 +59,9 @@ macro(expect_fail _dir)
       try_compile(Result \${CMAKE_CURRENT_BINARY_DIR}/${_dir}
           \${CMAKE_CURRENT_SOURCE_DIR}/${_dir}
           ${_dir}
+          OUTPUT_VARIABLE Out
       )
+      message(\"\${Out}\")
       if (Result)
         message(SEND_ERROR \"Succeeded build which should fail\")
       endif()