diff --git a/cmake/ecbuild_add_test.cmake b/cmake/ecbuild_add_test.cmake index 9f5bad8..0b455d7 100644 --- a/cmake/ecbuild_add_test.cmake +++ b/cmake/ecbuild_add_test.cmake @@ -134,6 +134,9 @@ # PROPERTIES : optional # custom properties to set on the target # +# TEST_PROPERTIES : optional +# custom properties to set on the test +# # ENVIRONMENT : optional # list of environment variables to set in the test environment # @@ -185,7 +188,7 @@ function( ecbuild_add_test ) set( single_value_args TARGET ENABLED COMMAND TYPE LINKER_LANGUAGE MPI OMP WORKING_DIRECTORY ) set( multi_value_args SOURCES OBJECTS LIBS INCLUDES TEST_DEPENDS DEPENDS LABELS ARGS PERSISTENT DEFINITIONS RESOURCES TEST_DATA CFLAGS - CXXFLAGS FFLAGS GENERATED CONDITION PROPERTIES ENVIRONMENT ) + CXXFLAGS FFLAGS GENERATED CONDITION TEST_PROPERTIES PROPERTIES ENVIRONMENT ) cmake_parse_arguments( _PAR "${options}" "${single_value_args}" "${multi_value_args}" ${_FIRST_ARG} ${ARGN} ) @@ -467,6 +470,10 @@ function( ecbuild_add_test ) set_target_properties( ${_PAR_TARGET} PROPERTIES ${_PAR_PROPERTIES} ) endif() + if( DEFINED _PAR_TEST_PROPERTIES ) + set_tests_properties( ${_PAR_TARGET} PROPERTIES ${_PAR_TEST_PROPERTIES} ) + endif() + # get test data if( _PAR_TEST_DATA )