summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/try_run/ConfigureLog.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/try_run/ConfigureLog.cmake')
-rw-r--r--Tests/RunCMake/try_run/ConfigureLog.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/Tests/RunCMake/try_run/ConfigureLog.cmake b/Tests/RunCMake/try_run/ConfigureLog.cmake
index 4b5c7cb..6635d73 100644
--- a/Tests/RunCMake/try_run/ConfigureLog.cmake
+++ b/Tests/RunCMake/try_run/ConfigureLog.cmake
@@ -1,15 +1,31 @@
try_run(RUN_RESULT COMPILE_RESULT
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-bad.c
+ LOG_DESCRIPTION "Source that should not compile."
)
try_run(RUN_RESULT COMPILE_RESULT
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c
+ NO_LOG
)
+message(CHECK_START "Check 1")
+try_run(RUN_RESULT COMPILE_RESULT
+ SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c
+ LOG_DESCRIPTION "Source that should compile."
+ )
+
+message(CHECK_START "Check 2")
try_run(RUN_RESULT COMPILE_RESULT
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c
RUN_OUTPUT_VARIABLE RUN_OUTPUT
)
+if (RUN_RESULT)
+ message(CHECK_PASS "passed")
+ message(CHECK_PASS "passed")
+else()
+ message(CHECK_FAIL "failed")
+ message(CHECK_FAIL "failed")
+endif()
try_run(RUN_RESULT COMPILE_RESULT
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/ConfigureLog-test.c