1

I'm trying to build boost.lib with bjam, but no matter what I do, I can't get it to recognise my BOOST_LOG_NO_COMPILER_TLS flag. I'm building like this:

bjam address-model=32 --toolset=msvc-10.0 --build-type=complete 
  --with-log variant=debug link=static runtime-link=static   
  define=BOOST_LOG_NO_COMPILER_TLS stage

To verify that it's ignoring the flag, I compiled with and without this flag and used Beyond Compare to compare each file generated in the stage folder.

All of the lib files were identical. I would expect differences if bjam was recognising my define fields.

I'm new to boost and bjam, so am I doing something wrong?

Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
  • 1
    Your syntax is correct, with the exception of toolset -- it should be `toolset=msvc-10.0` sans `--`. You could try `cxxflags="-DBOOST_LOG_NO_COMPILER_TLS"` instead of using `define`, but you're using `define` correctly so I doubt that will help. Have you checked the sources for `#undef BOOST_LOG_NO_COMPILER_TLS`? – ildjarn Dec 22 '11 at 23:32
  • 1
    Also, are you sure that the version of Boost.Log that you're using even uses the `BOOST_LOG_NO_COMPILER_TLS` macro? Maybe it's just for older versions; you should grep the sources to make sure it's still applicable. E.g., your previous thread indicated that Boost.Log only works with Boost.FileSystem v2, but that is certainly no longer the case, so more than just that may have changed. – ildjarn Dec 22 '11 at 23:40

1 Answers1

1

It turns out that it wasn't actually recompiling stuff, even though I specified --build-type=complete.

If you have stuff in your bin.v2 folder, it won't overwrite it. Either delete the bin.v2 folder or specify some other unknown magical parameter to bjam.

Steve Dunn
  • 21,044
  • 11
  • 62
  • 87
  • 1
    In fact, if you type `bjam --help` (or `b2 --help` in current version) it will explain what "--build-type=complete" means -- it means you'll get all possible build variants. If you want to rebuild everything, including files that are up-to-date, use the `-a` option (also explained in the `--help` output) – Vladimir Prus Dec 26 '11 at 07:32
  • Thanks for the pointer Vladimir. I was still confused as to why it doesn't rebuild if a 'define' is specified, but then thinking about it, it can't know that the 'define' (preprocessor) specified is different to the one that the outputs were last built against. – Steve Dunn Dec 27 '11 at 14:34
  • 1
    That's correct. It is technically possible to notice that the define has changed, in particular SCons does this by keeping a checksum of entire build command line. However, it's not entirely clear whether rebuilding entire project if add a define is a good thing. – Vladimir Prus Dec 28 '11 at 07:05