Skip to content

Commit 67bf9aa

Browse files
committed
Add CONFIGURATIONS option to add_testcase
1 parent de01888 commit 67bf9aa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmake/AddTestcase.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ set(RTTR_LSAN_SUPPRESSION_FILE ${CMAKE_CURRENT_LIST_DIR}/lsan.supp)
1212
function(add_testcase)
1313
set(options )
1414
set(oneValueArgs NAME)
15-
set(multiValueArgs LIBS INCLUDES)
15+
set(multiValueArgs LIBS INCLUDES CONFIGURATIONS)
1616
cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
1717
string(MAKE_C_IDENTIFIER "Test_${ARG_NAME}" name)
1818
file(GLOB sources *.[ch]pp *.[hc] *.cxx)
@@ -30,7 +30,7 @@ function(add_testcase)
3030
# Use full paths for defines (makes Boost.Test with the VS addin work better)
3131
target_compile_options(${name} PUBLIC /FC)
3232
endif()
33-
add_test(NAME ${name} COMMAND ${name} WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
33+
add_test(NAME ${name} COMMAND ${name} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} CONFIGURATIONS ${ARG_CONFIGURATIONS})
3434
if(MSVC)
3535
set_property(TARGET ${name} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
3636
endif()

0 commit comments

Comments
 (0)