Config overrides / custom platforms and jam.exe on the command line

Added by Ben Hymers over 5 years ago

There's probably something very obvious I'm missing here... if I have a project arranged like the one in tests/config_overrides, what command line do I need to use to pick up and use the overridden compilers etc. in the jam subdirectory? I can't see anything in the manual about a command line parameter to do this, and the way workspace generation does it looks very specific to workspace generation (using the .config file).


Replies (4)

RE: Config overrides / custom platforms and jam.exe on the command line - Added by Kevin Thacker over 5 years ago

I use JAM_MODULES_USER_PATH environment variable when building for jam on the command-line.

The variable is defined in the config file under "JamModulesUserPath" when building the workspace.

If you put your files in the JAM_MODULES_USER_PATH (with the same directory setup that jam uses) then it will look here first before the jam one.

Does that help?

BTW, I have added jam scripts for a number of console platforms so I am familiar with it's needs so I can help a bit here too.

RE: Config overrides / custom platforms and jam.exe on the command line - Added by Ben Hymers over 5 years ago

Thanks! Using that I got a little closer, but I think that the config_overrides test is set up wrong. After setting an environment variable called JAM_MODULES_USER_PATH to the right directory, calling jam with the command line "jam CONFIG=retail" gives this error:

c-compilers/configs/win32-retail.jam: No such file or directory

If I rename "c-compilers/win32-vc-retail.jam" to "c-compilers/configs/win32-retail.jam" (i.e. remove the "vc" part and put it in a "configs/" subdirectory), it then finds the config file but doesn't build anything:

Building configuration retail...
*** found 1 target(s)...
*** finished in 0.00 sec

If I build release (i.e. something that has a config file elsewhere but not in this test), it says there are 17 targets, but fails to compile because the preprocessor defines from the custom config files are needed.

I've tried all sorts of combinations of things to get it to realise that "vc" should be in the path (calling jam with things like "jam CONFIG=retail COMPILER=vc COMPILER_SUITE=vc COMPILER_SUITE_SYMBOL=vc" and so on) but it's always looking for that same path.

So now I'm all out of ideas again :) Could you perhaps try to build the config_overrides test from the command line?

RE: Config overrides / custom platforms and jam.exe on the command line - Added by Joshua Jensen over 5 years ago

I upgraded the config_overrides test/sample in the nextgen branch. It works again.

-Josh

RE: Config overrides / custom platforms and jam.exe on the command line - Added by Ben Hymers over 5 years ago

Excellent, thanks Josh! It works just fine now.

(1-4/4)