[Scons-users] UT application does not get built

Dynastic Space dynasticspace at gmail.com
Sat May 13 05:40:43 EDT 2017


Fixed it, but I still need to understand the reason:

I was running scons like this:

scons applications/app

Now, there is a SConscript file under applications/app (not shown in the
tree above, sorry), which calls env.Program for both app and app-ut.
However, the program build for app-ut was not being called.
Once I ran scons without pointing it to applicaitons/app, the ut
application started getting built.

Could you please explain why that happens, and how I could have figured it
out more easily?

Thanks,

Howling

On Sat, May 13, 2017 at 11:03 AM, Dynastic Space <dynasticspace at gmail.com>
wrote:

> A simplified view of my tree looks like this:
>
> .
> |-- applications
> |   `-- app
> |       |-- include
> |       |-- SConscript
> |       |-- src
> |       |   `-- main.cpp
> |       `-- tests
> |           `-- main.cpp
> |-- build
> |   `-- debug
> |       `-- applications
> |           `-- app
> |               |-- app
> |               |-- src
> |               |   `-- main.o
> |               `-- tests
> |                   |-- main_modified.o
> |                   `-- main.o
> `-- SConstruct
>
> main_modified.o is a unit-test version of app/src/main.cpp, where main()
> is changed to __main() so that there wouldn't be two main implementations
> in the unit test.
>
> as you can see - the object files are created correctly, but when I run
> env.Program with the correct name for the ut application (app-ut) the
> executable is not created.
> I can't find my app-ut anywhere in my tree.
>
> What can be the reason, and how can I go about debugging such an issue
> without your assistance? --debug=explain doesn't explain anything do me.
>
> Thanks,
>
> Howling.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170513/7d200a58/attachment.html>


More information about the Scons-users mailing list