As mentioned in your answer, you can use the SCons Alias() function to assign a name to one or several targets, but this does not tell SCons when to build the targets if you simply execute scons
without specifying targets. When you dont specify any targets, you'll notice that the unit tests will be built and/or executed.
To tell SCons what should be built, you can use the SCons Default() function. When you dont use this function, every target will be built by default: obviously only those targets that need to be built, according to the dependencies, etc.
To only build the targets in your src/SConscript
by default, then assuming its a library, you can do the following:
libTarget = env.Library('yourLib', theSourceFiles)
env.Default(libTarget)
You can use the Default() function for several different targets.
Now when you execute scons
without any targets, only those targets set with the Default() function will be built. And if you execute scons check
, then the check target and its dependencies will be built (assuming you called Alias() with the check target and havent also called Default() with the check target)