summaryrefslogtreecommitdiffstats
path: root/Tests/TryCompile/exit_with_error.c
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-01 15:16:29 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-01 15:16:29 (GMT)
commiteddf1cf39f50f9b06131ead26b5b84b8edfd60da (patch)
tree1cbc429b0f2006f19ee9c19773f841648405793d /Tests/TryCompile/exit_with_error.c
parent26a5a295eb231dc9fae9ea90f6cf28d3b4eecaa2 (diff)
downloadCMake-eddf1cf39f50f9b06131ead26b5b84b8edfd60da.zip
CMake-eddf1cf39f50f9b06131ead26b5b84b8edfd60da.tar.gz
CMake-eddf1cf39f50f9b06131ead26b5b84b8edfd60da.tar.bz2
ENH: improve TRY_RUN() for crosscompiling: instead of just failing, it now
creates two cache variables, one for the RUN_RESULT, one for the RUN_OUTPUT (if required), which can be set or preset by the user. It has now also two new arguments: RUN_OUTPUT_VARIABLE and COMPILE_OUTPUT_VARIABLE (the old OUTPUT_VARIABLE merges both), so if only COMPILE_OUTPUT_VARIABLE is used the run time output of the TRY_RUN is unused and the user doesn't have to care about the output when crosscompiling. This is now used in FindThreads.cmake, CheckC/CXXSourceRuns.cmake and TestBigEndian.cmake, which used the output only for the logfile (compile output is still there). Test/TryCompile/ now also tests the behaviour of OUTPUT_VARIABLE, RUN_OUTPUT_VARIABLE and COMPILE_OUTPUT_VARIABLE. Alex
Diffstat (limited to 'Tests/TryCompile/exit_with_error.c')
-rw-r--r--Tests/TryCompile/exit_with_error.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/TryCompile/exit_with_error.c b/Tests/TryCompile/exit_with_error.c
index a9a283d..f3c523d 100644
--- a/Tests/TryCompile/exit_with_error.c
+++ b/Tests/TryCompile/exit_with_error.c
@@ -1,4 +1,7 @@
+#include <stdio.h>
+
int main()
{
+ printf("hello world\n");
return -1;
}