From 1103b5333b7aebf64b11eff1dab44c4fa2b9cf9d Mon Sep 17 00:00:00 2001 From: Hudd Date: Mon, 11 Mar 2024 12:17:40 +0400 Subject: [PATCH] build: add NEGATIVE option for aw_add_test --- awlib/cmake/aw-common.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/awlib/cmake/aw-common.cmake b/awlib/cmake/aw-common.cmake index 4ee861fa..a37e9d70 100644 --- a/awlib/cmake/aw-common.cmake +++ b/awlib/cmake/aw-common.cmake @@ -103,7 +103,7 @@ endfunction() function(aw_add_test NAME) - set(options) + set(options NEGATIVE) set(arguments) set(multivalue SOURCES PARAMS) cmake_parse_arguments(PARSE_ARGV 1 ARG "${options}" "${arguments}" "${multivalue}") @@ -113,4 +113,8 @@ function(aw_add_test NAME) NAME ${NAME} COMMAND ${NAME} ${ARG_PARAMS} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + + if (ARG_NEGATIVE) + set_property(TEST ${NAME} PROPERTY WILL_FAIL true) + endif() endfunction()