Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TEST_PROPERTIES keyword in ecbuild_add_test #76

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading