scons

Source code compiled from a Repository() is not put in the variant dir for a Hierarchical SCons project

两盒软妹~` 提交于 2019-11-30 20:44:13
问题 I have a Hierarchical project that uses source code from a common system-directory, for which I am using the SCons Repository() function and want all the build output (local code and code taken from the Repository) placed in a variant_dir. If I use the Repository() function in a simple scenario (non-hierchical with no calls to sub-directory SConscripts) then the compiled Repository() object file is placed in the variant_dir as expected. But if I do the same in a hierarchical build, the

How to tell scons to use MinGW instead of MSVC

最后都变了- 提交于 2019-11-30 08:56:47
问题 I'm trying to build the C++ port of zxing on Windows, but scons fails with: cl : Command line error D8021 : invalid numeric argument '/Wextra' I have both VS2010 and MinGW installed, and scons tries to use the MSVC compiler, even though the SConscript file assumes gcc and use gcc-specific parameters, which causes the error. How can I tell scons to use MinGW instead? 回答1: Scons uses MSVC compiler by default on windows. To set mignw compiler use tools parameter while creating Environment object

How can I make Clang's “scan-build” work with SCons?

独自空忆成欢 提交于 2019-11-30 08:13:13
I've got a project built with SCons and I'm trying to use the Clang Static Analyzer to analyze the code. However, when running scan-build scons SCons seems to ignore the settings introduced by scan-build . How can I make this work? The way scan-build works is it sets up various environment variables that are usually used by build systems (such as make ) to control how the build happens. Some of these are: CC - name of program to use as C compiler CXX - name of program to use as C++ compiler CCC_* - various environment variables that control the behaviour of Clang's static analyzer SCons

How can I make Clang's “scan-build” work with SCons?

旧城冷巷雨未停 提交于 2019-11-29 11:11:03
问题 I've got a project built with SCons and I'm trying to use the Clang Static Analyzer to analyze the code. However, when running scan-build scons SCons seems to ignore the settings introduced by scan-build . How can I make this work? 回答1: The way scan-build works is it sets up various environment variables that are usually used by build systems (such as make ) to control how the build happens. Some of these are: CC - name of program to use as C compiler CXX - name of program to use as C++

How to tell scons to use MinGW instead of MSVC

↘锁芯ラ 提交于 2019-11-29 09:35:23
I'm trying to build the C++ port of zxing on Windows, but scons fails with: cl : Command line error D8021 : invalid numeric argument '/Wextra' I have both VS2010 and MinGW installed, and scons tries to use the MSVC compiler, even though the SConscript file assumes gcc and use gcc-specific parameters, which causes the error. How can I tell scons to use MinGW instead? Torsten Scons uses MSVC compiler by default on windows. To set mignw compiler use tools parameter while creating Environment object. env = Environment(tools = ['mingw']) Below is my working SConstruct for mingw on Windows: import

How to force Scons output (exe, obj, lib & dll) to specific build directory?

北战南征 提交于 2019-11-29 09:27:52
I've been trying to get scons to output exe, obj, lib and dll files to a specific build directory. My file structure looks like this: /projectdir /build /bin /obj /source /subdirs /.. SConstruct Basically, what I get now is my source directory is getting polluted with obj files. I'd rather have it all in one place. The SConstruct file looks like this: env.VariantDir('build', 'source', duplicate = 0) env.Program('Hierarchy', source = ['source/sconstest.cpp', 'source/utils/IntUtil.cpp']) The easiest way I've found is to use 2 files, a SConstruct file and a separate SConscript. In the SConstruct

How do I get projects to place their build output into the same directory with Scons?

孤人 提交于 2019-11-28 19:15:06
问题 Background I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: Prj1 is an EXE that depends on Prj2 Prj2 is a DLL that exports some functions The problem I'm running into is that the library builds its .obj, .pdb, .lib, .dll, etc. files in the same directory as it's SConscript file while the EXE builds its files in the same directory as its SConscript. The application successfully builds both the Prj2 dependency and itself. However, you cannot run the

What are the differences between Autotools, Cmake and Scons?

耗尽温柔 提交于 2019-11-28 14:57:05
What are the differences between Autotools, Cmake and Scons? Svartalf In truth, Autotools' only real 'saving grace' is that it is what all the GNU projects are largely using. Issues with Autotools: Truly ARCANE m4 macro syntax combined with verbose, twisted shell scripting for tests for "compatibility", etc. If you're not paying attention, you will mess up cross-compilation ability (It should clearly be noted that Nokia came up with Scratchbox/Scratchbox2 to side-step highly broken Autotools build setups for Maemo/Meego.) If you, for any reason, have fixed, static paths in your tests, you're

How to force Scons output (exe, obj, lib & dll) to specific build directory?

冷暖自知 提交于 2019-11-28 02:52:56
问题 I've been trying to get scons to output exe, obj, lib and dll files to a specific build directory. My file structure looks like this: /projectdir /build /bin /obj /source /subdirs /.. SConstruct Basically, what I get now is my source directory is getting polluted with obj files. I'd rather have it all in one place. The SConstruct file looks like this: env.VariantDir('build', 'source', duplicate = 0) env.Program('Hierarchy', source = ['source/sconstest.cpp', 'source/utils/IntUtil.cpp']) 回答1:

Prevent SCons from looking for standard tools

回眸只為那壹抹淺笑 提交于 2019-11-28 01:56:04
I am currently setting up SCons for cross-compilation with Windows as the host OS. I am building a custom Environment for the cross-compiler, but SCons insists on looking for Visual Studio each time I start it up (and prints a warning that it cannot find it, because I don't have it installed). Can I prevent it from looking for standard tools I know I am not going to use? Brady There are at least 2 ways to do this, the first way is the easiest, try creating the environment specifying the compiler, as follows: env = Environment(CC = '/path/to/the/compiler') You'll probably need to add paths for