[Scons-users] Confusion with MSVSProject builder

Francis Bolduc fbolduc at gmail.com
Fri Mar 15 08:42:18 EDT 2013


By using Microsoft Visual Studio to manage the invocation of the
compiler, you loose all the power of SCons. There is no point in
generating Microsoft Visual Studio project with SCons if you're not
going to use SCons. There are other tools better suited to do that.

The power of SCons is to manage the invocation of the compiler (or any
other commands, such as linker, copying files, etc.) to enforce
correctness, while maximizing parallelism, and minimizing work. It
does a far better job at that than Microsoft Visual Studio. For
example, SCons parses every source file and knows about the
dependencies between each of them, so that when one changes, it knows
exactly what to rebuild.

If you want to use the power of SCons, you can do so from within
Microsoft Visual Studio. There is a type of Microsoft Visual Studio
project called "nmake" projects that delegates the responsibility of
managing the invocation of the compiler to another tool. That other
tool is usually "nmake", but it can also be SCons. This is the type of
project that SCons will generate for you.


>From the perspective of the user, there is no difference between

"native" and SCons-powered "nmake" projects. They will both build your
program using the same compiler (cl.exe) and linker (link.exe). Thus,
Microsoft Visual Studio will react the same way to compilation errors,
warnings and such. The only difference will be that your builds will
always be correct and will likely be faster.

--
Francis Bolduc, B.Sc.


On Thu, Mar 14, 2013 at 10:32 PM, andrew aspden <a.aspden at gmail.com> wrote:

> Yes, I to use Visual Studio to compile the program. This is no good for

> scons?

>

>

> On Thu, Mar 14, 2013 at 7:06 PM, Francis Bolduc <fbolduc at gmail.com> wrote:

>>

>> Do you actually want to use Microsoft Visual Studio to build your

>> program itself, or you want Microsoft Visual Studio to invoke SCons to

>> build your program?

>>

>> If the former, you don't want SCons, you want CMake.

>>

>> If the latter, then yes, the only way is to use the Program builder.

>>

>> --

>> Francis Bolduc, B.Sc.

>>

>>

>> On Wed, Mar 13, 2013 at 9:16 PM, andrew aspden <a.aspden at gmail.com> wrote:

>> > Hi again, I'm trying to figure out how I am supposed to write a

>> > SConscript

>> > file that only builds Visual Studio sln + project files and does not

>> > build

>> > the header and source files that I'm adding to the project. As I

>> > understand

>> > so far env.Program is the only way to compile from Scons, correct? Any

>> > ideas

>> > or thoughts? Thanks in advance.

>> >

>> > _______________________________________________

>> > Scons-users mailing list

>> > Scons-users at scons.org

>> > http://four.pairlist.net/mailman/listinfo/scons-users

>> >

>> _______________________________________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/mailman/listinfo/scons-users

>

>

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>



More information about the Scons-users mailing list