Skip to content

Commit

Permalink
build: add NEGATIVE option for aw_add_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Hedede committed Mar 11, 2024
1 parent 01e8b44 commit 1103b53
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion awlib/cmake/aw-common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand All @@ -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()

0 comments on commit 1103b53

Please sign in to comment.