@ -14,6 +14,7 @@
# calamares_add_test (
# calamares_add_test (
# < N A M E >
# < N A M E >
# [ G U I ]
# [ G U I ]
# [ R E S O U R C E S F I L E ]
# S O U R C E S < F I L E . . >
# S O U R C E S < F I L E . . >
# )
# )
@ -24,13 +25,14 @@ function( calamares_add_test )
# p a r s e arguments ( name needs to be saved before passing ARGN into the macro )
# p a r s e arguments ( name needs to be saved before passing ARGN into the macro )
set ( NAME ${ ARGV0 } )
set ( NAME ${ ARGV0 } )
set ( options GUI )
set ( options GUI )
set ( oneValueArgs NAME RESOURCES )
set ( multiValueArgs SOURCES LIBRARIES DEFINITIONS )
set ( multiValueArgs SOURCES LIBRARIES DEFINITIONS )
cmake_parse_arguments ( TEST "${options}" " " "${multiValueArgs}" ${ ARGN } )
cmake_parse_arguments ( TEST "${options}" " ${oneValueArgs} " "${multiValueArgs}" ${ ARGN } )
set ( TEST_NAME ${ NAME } )
set ( TEST_NAME ${ NAME } )
if ( ECM_FOUND AND BUILD_TESTING )
if ( ECM_FOUND AND BUILD_TESTING )
ecm_add_test (
ecm_add_test (
$ { T E S T _ S O U R C E S }
$ { T E S T _ S O U R C E S } $ { T E S T _ R E S O U R C E S }
T E S T _ N A M E
T E S T _ N A M E
$ { T E S T _ N A M E }
$ { T E S T _ N A M E }
L I N K _ L I B R A R I E S
L I N K _ L I B R A R I E S
@ -44,5 +46,8 @@ function( calamares_add_test )
if ( TEST_GUI )
if ( TEST_GUI )
target_link_libraries ( ${ TEST_NAME } calamaresui Qt5::Gui )
target_link_libraries ( ${ TEST_NAME } calamaresui Qt5::Gui )
endif ( )
endif ( )
if ( TEST_RESOURCES )
calamares_autorcc ( ${ TEST_NAME } ${ TEST_RESOURCES } )
endif ( )
endif ( )
endif ( )
endfunction ( )
endfunction ( )