Hi everyone,

  I'm trying to find a way to either compile my tests or, if the user pass --run, run them. But I've been unsuccessful until now. Here is what I tried:

jamfile.jam:

test-suite unittest_run : [ run $(files) : $(args) : : : unittest_myproject ] ;
test-suite unittest_compile : [ compile $(files) : : unittest_myproject ] ;
explicit unittest_run unittest_compile ;

project-root.jam:

if --run in $(ARGV)
{
  build-project myproject//unittest_run ;
}
else
{
  build-project myproject//unittest_compile ;
}

something like that, the error is:

error: No best alternative for myproject/unittest_myproject
    next alternative: required properties: (empty)
        matched
    next alternative: required properties: (empty)
        matched


I tried this too:

jamfile.jam:
local method = compile ;
if --run in $(ARGV)
{
    method = run ;
}
test-suite unittest : [ testing.make-test $(method) : $(files) /gt/$(PROJ_NAME) : $(requirements) : unittest_$(PROJ_NAME) ] ;
explicit unittest ;

project-root.jam:
build-project myproject//unittest ;

any help is welcome