mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 20:23:11 +01:00
[test] Make sure the test program in GetErrcMessages.cmake exits normally.
If for some reason the test program does not exit normally it'd currently lead to a false positive and it's stdout output being assigned to the output variable. Instead, check the test program exited normally before assigning the process output to the out variable. Follow up on rGaf2796c76d2ff4b73165ed47959afd35a769beee Fixes an issue discovered post commit in https://reviews.llvm.org/D98278
This commit is contained in:
parent
92405c8fe8
commit
1a004a81cb
@ -29,7 +29,7 @@ function(get_errc_messages outvar)
|
|||||||
${errc_test_code}
|
${errc_test_code}
|
||||||
RUN_OUTPUT_VARIABLE errc_result
|
RUN_OUTPUT_VARIABLE errc_result
|
||||||
COMPILE_OUTPUT_VARIABLE errc_compile_errors)
|
COMPILE_OUTPUT_VARIABLE errc_compile_errors)
|
||||||
if (errc_compiled)
|
if (errc_compiled AND "${errc_exit_code}" STREQUAL "0")
|
||||||
set(${outvar} ${errc_result} PARENT_SCOPE)
|
set(${outvar} ${errc_result} PARENT_SCOPE)
|
||||||
else()
|
else()
|
||||||
set(${outvar} "" PARENT_SCOPE)
|
set(${outvar} "" PARENT_SCOPE)
|
||||||
|
Loading…
Reference in New Issue
Block a user