Skip to content

Commit

Permalink
Add TEST_PROPERTIES keyword in ecbuild_add_test
Browse files Browse the repository at this point in the history
  • Loading branch information
tweska committed Jan 9, 2025
1 parent 23c94e7 commit 1d65e21
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/ecbuild_add_test.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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} )

Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit 1d65e21

Please sign in to comment.