[Scons-users] UT application does not get built

William Blevins wblevins001 at gmail.com
Sat May 13 12:37:09 EDT 2017


Howling,

If I understand your question,

1) SCons only allows for targets (build outputs) on the commandline
2) You specified the target "applications/app"; thus, SCons will only
build targets that appear at the directory level "applications/app"
and below. Having a builder command here is not enough.
3) I assume that your executable goes somewhere else (E.G. "bin")
which is not below "application/app"; therefore, "bin" is not a
target.

V/R,
William

On Sat, May 13, 2017 at 12:14 PM, Bill Deegan <bill at baddogconsulting.com> wrote:
> There's really not enough info to help you.
> Please provide simple test case which reproduces the problem..
> Also where would you expect the test program binary to be produced in the
> tree you've shared?
> Or at least the contents of your SConstruct and SConscript.
>
>
> -Bill
>
> On Sat, May 13, 2017 at 2:40 AM, Dynastic Space <dynasticspace at gmail.com>
> wrote:
>>
>> 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.
>>
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>


More information about the Scons-users mailing list