[Scons-users] Print out messages only if target is building
Anna Cheremnykh
anna at unigine.com
Wed Aug 1 08:19:24 EDT 2018
Hi,
I stuck with a problem: I want to print message only when given
target(Scinscript) is building.
What we have: several samples, each sample in separate directory with
separate Sconscript. Some of samples require 3rdparty SDKs and
environment variables set to these SDKs. But if developer doesn't have
such env var - sample build should be just skipped without errors.
So in sconsripts we added something like this:
if not os.getenv('SOME_SDK_ROOT'):
print('SOME_SDK_ROOT not found, ' + sample_name + ' build skipped')
Return()
I understand that scons read all sconsript files first. And I see this
message every time even if I build another samples or another
components. So my question how NOT to print messages if I call another
target from another Sconscript? Thanks!
--
Anna Ch.
More information about the Scons-users
mailing list