Commit 87800f4c authored by Marcel Loose's avatar Marcel Loose 😎

Bug 1310: Set CTEST_CUSTOM_<XXX> variable only if @CTEST_CUSTOM_<XXX>@ is not...

Bug 1310: Set CTEST_CUSTOM_<XXX> variable only if @CTEST_CUSTOM_<XXX>@ is not empty. This solves the issue that compiler errors were no longer reported, because an empty string evaluated to integer value 0.
parent 5c4bbbb5
......@@ -7,47 +7,54 @@
# $Id$
# Assign contents of <val> to <var> if <val> is set.
macro(set_if_set var val)
if(NOT "${val}" MATCHES "^$")
set("${var}" "${val}")
endif(NOT "${val}" MATCHES "^$")
endmacro(set_if_set)
# Regular expression for errors during build process
set(CTEST_CUSTOM_ERROR_MATCH "@CTEST_CUSTOM_ERROR_MATCH@")
set_if_set(CTEST_CUSTOM_ERROR_MATCH "@CTEST_CUSTOM_ERROR_MATCH@")
# Regular expression for error exceptions during build process
set(CTEST_CUSTOM_ERROR_EXCEPTION "@CTEST_CUSTOM_ERROR_EXCEPTION@")
set_if_set(CTEST_CUSTOM_ERROR_EXCEPTION "@CTEST_CUSTOM_ERROR_EXCEPTION@")
# Regular expression for warnings during build process
set(CTEST_CUSTOM_WARNING_MATCH "@CTEST_CUSTOM_WARNING_MATCH@")
set_if_set(CTEST_CUSTOM_WARNING_MATCH "@CTEST_CUSTOM_WARNING_MATCH@")
# Regular expression for warning exception during build process
set(CTEST_CUSTOM_WARNING_EXCEPTION "@CTEST_CUSTOM_WARNING_EXCEPTION@")
set_if_set(CTEST_CUSTOM_WARNING_EXCEPTION "@CTEST_CUSTOM_WARNING_EXCEPTION@")
# Maximum number of errors to display
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "@CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS@")
set_if_set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS "@CTEST_CUSTOM_MAXIMUM_NUMBER_OF_ERRORS@")
# Maximum number of warnings to display
set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "@CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS@")
set_if_set(CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS "@CTEST_CUSTOM_MAXIMUM_NUMBER_OF_WARNINGS@")
# List of tests to ignore during the Test stage
set(CTEST_CUSTOM_TESTS_IGNORE "@CTEST_CUSTOM_TESTS_IGNORE@")
set_if_set(CTEST_CUSTOM_TESTS_IGNORE "@CTEST_CUSTOM_TESTS_IGNORE@")
# List of tests to ignore during the MemCheck stage
set(CTEST_CUSTOM_MEMCHECK_IGNORE "@CTEST_CUSTOM_MEMCHECK_IGNORE@")
set_if_set(CTEST_CUSTOM_MEMCHECK_IGNORE "@CTEST_CUSTOM_MEMCHECK_IGNORE@")
# Command to execute before any tests are run during Test stage
set(CTEST_CUSTOM_PRE_TEST "@CTEST_CUSTOM_PRE_TEST@")
set_if_set(CTEST_CUSTOM_PRE_TEST "@CTEST_CUSTOM_PRE_TEST@")
# Command to execute after any tests are run during Test stage
set(CTEST_CUSTOM_POST_TEST "@CTEST_CUSTOM_POST_TEST@")
set_if_set(CTEST_CUSTOM_POST_TEST "@CTEST_CUSTOM_POST_TEST@")
# Maximum size of passed test output
set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "@CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE@")
set_if_set(CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE "@CTEST_CUSTOM_MAXIMUM_PASSED_TEST_OUTPUT_SIZE@")
# Maximum size of failed test output
set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "@CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE@")
set_if_set(CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE "@CTEST_CUSTOM_MAXIMUM_FAILED_TEST_OUTPUT_SIZE@")
# Command to execute before any tests are run during MemCheck stage
set(CTEST_CUSTOM_PRE_MEMCHECK "@CTEST_CUSTOM_PRE_MEMCHECK@")
set_if_set(CTEST_CUSTOM_PRE_MEMCHECK "@CTEST_CUSTOM_PRE_MEMCHECK@")
# Command to execute after any tests are run during MemCheck stage
set(CTEST_CUSTOM_POST_MEMCHECK "@CTEST_CUSTOM_POST_MEMCHECK@")
set_if_set(CTEST_CUSTOM_POST_MEMCHECK "@CTEST_CUSTOM_POST_MEMCHECK@")
# Regular expression for excluding files from coverage testing
set(CTEST_CUSTOM_COVERAGE_EXCLUDE "@CTEST_CUSTOM_COVERAGE_EXCLUDE@")
set_if_set(CTEST_CUSTOM_COVERAGE_EXCLUDE "@CTEST_CUSTOM_COVERAGE_EXCLUDE@")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment