[Scons-users] MSbuild scons wrapper

Sergio Basurco sergio.b at coherentsynchro.com
Tue Apr 4 11:16:58 EDT 2017


With --tree=prune I see something like:

   +-build\release\lib\mycpp.lib
   | +-"*.obj"
   | +-net_myproject
   .
   .
   .

But there's no dependency tree for 'net_myproject'. So I guess you're 
right, how could I correctly specify the targets for my external msbuild?

Saludos / Best regards,

*Sergio Basurco*
Coherent Synchro

On 04/04/2017 16:44, Bill Deegan wrote:
> Likely your issue is here:
>
>         netmodules.extend( env.Command( 'net_' + proj_name, [], 
> pycommand ) )
>
> unless net_+proj_name is the actual name of the library you're 
> generating, SCons won't know about it.
>
> You shouldn't need depends if you specify the targets and dependencies 
> correctly.
>
> What does the output of:
> scons --tree=prune look like?
> Does it show the proper dependencies?
>
> -Bill
>
> On Tue, Apr 4, 2017 at 10:18 AM, Sergio Basurco 
> <sergio.b at coherentsynchro.com <mailto:sergio.b at coherentsynchro.com>> 
> wrote:
> >
> > Hi Bill,
> >
> > I have a solution with cpp modules and net modules, come cpp modules 
> depend on .net modules. Simplified I have the following:
> >
> > for cppmodule in solution:
> >     cpplib = env.Library(libname, objects)
> >     netmodules = []
> >     for netmodule in cppdependencies:
> >         proj_name = get_project_name_for_module(netmodule)
> >         pycommand = generate_external_msbuild_command()
> >         netmodules.extend( env.Command( 'net_' + proj_name, [], 
> pycommand ) )
> >     env.Depends(cpplib, netmodules)
> >
> > The generate_external_msbuild_command calls an external python 
> script that constructs a temporary .bat file and calls it via Popen.
> >
> > I find that sometimes the cpplib library is built before the .bat is 
> called.
> >
> > Saludos / Best regards,
> >
> > Sergio Basurco
> > Coherent Synchro
> >
> > On 04/04/2017 16:01, Bill Deegan wrote:
> >
> > Sergio,
> >
> > Can you provide us with the logic you have in your SConstruct?
> > It's hard to comment on your implementation without seeing it.
> >
> > _Bill
> >
> > On Tue, Apr 4, 2017 at 7:40 AM, Sergio Basurco 
> <sergio.b at coherentsynchro.com <mailto:sergio.b at coherentsynchro.com>> 
> wrote:
> >>
> >> Hi all,
> >>
> >> I've setup a msbuild Command within scons, but it is not really 
> elegant and it's giving me some trouble. What I'm doing is creating a 
> bat file from python, then calling it as a subprocess, this bat is the 
> one calling vcvarsall.bat and then the msbuild command.
> >>
> >> I set this Command as a dependency of some Scons node, however it 
> seems like the .bat is ran afterwards, and my node does not find the 
> .dll generated by msbuild.
> >>
> >> Maybe I'm looking at this the wrong way, is there any un-official 
> way to call msbuild from scons? I know scons is meant to be a 
> replacement, but it would really help me to be able to call msbuild 
> for some windows-only c# projects I have. These projects have to be 
> built before my C++ programs and I'm failing to do so via scons.
> >>
> >> Thanks!
> >> --
> >>
> >> Saludos / Best regards,
> >>
> >> Sergio Basurco
> >> Coherent Synchro
> >>
> >>
> >> _______________________________________________
> >> Scons-users mailing list
> >> Scons-users at scons.org <mailto:Scons-users at scons.org>
> >> https://pairlist4.pair.net/mailman/listinfo/scons-users
> >>
> >
> >
> >
> > _______________________________________________
> > Scons-users mailing list
> > Scons-users at scons.org <mailto:Scons-users at scons.org>
> > https://pairlist4.pair.net/mailman/listinfo/scons-users
> >
> >
> >
> > _______________________________________________
> > Scons-users mailing list
> > Scons-users at scons.org <mailto: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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170404/cd0bc10c/attachment.html>


More information about the Scons-users mailing list