Merge pull request #2044 from lkeegan/fix_cmake_catch_add_tests_warning

fix warning in extras/CatchAddTests.cmake
This commit is contained in:
Martin Hořeňovský 2020-10-08 17:15:05 +02:00 committed by GitHub
commit 4ea18d6d17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,11 +55,7 @@ execute_process(
RESULT_VARIABLE reporters_result RESULT_VARIABLE reporters_result
WORKING_DIRECTORY "${TEST_WORKING_DIR}" WORKING_DIRECTORY "${TEST_WORKING_DIR}"
) )
if(${reporters_result} EQUAL 0) if(NOT ${reporters_result} EQUAL 0)
message(WARNING
"Test executable '${TEST_EXECUTABLE}' contains no reporters!\n"
)
elseif(${reporters_result} LESS 0)
message(FATAL_ERROR message(FATAL_ERROR
"Error running test executable '${TEST_EXECUTABLE}':\n" "Error running test executable '${TEST_EXECUTABLE}':\n"
" Result: ${reporters_result}\n" " Result: ${reporters_result}\n"