On 9/8/2015 9:13 PM, Tom Kent wrote:
On Tue, Sep 8, 2015 at 8:27 AM, Edward Diener
wrote: On 9/8/2015 9:02 AM, Tom Kent wrote:
On Fri, Sep 4, 2015 at 2:56 PM, Edward Diener
wrote: I can not document on Github Wiki, trac, and on this mailing list what
needs to be done. I will gladly discuss what I know here.
What does your bjam user-config.jam file look like for this?
I have separate user-config.jam files for each toolset, one of which gets symbolically linked to user-config.jam depending on which toolset I am using. This is necessary because Boost build wants to invoke every toolset in user-config.jam even when a b2 command line specifies only a single toolset to use. I already complained about this on the Boost build mailing list but evidently the change in Boost build will not happen.
What do you have in your batch file for setup?
The batch file sets the PATH and the user-config.jam for whichever toolset is being invoked. Then b2 is invoked with a particular toolset.
This setup is the only way I can work with multiple versions of mingw(-64)/gcc and multiple versions of clang.
Do you think you could post the contents of these files? I'd really like to see what you did to setup the toolsets in the (various) user-config.jam files. The batch file sounds more self explanatory, but would still be nice to see.
Here is a user-config.jam for any VC++ version:
# Configure specific gcc version, giving alternative name to use. # using gcc : 3.3 : C:/Utilities/MinGW/v3.3.3/bin/g++ ; # using gcc : 3.4 : C:/Utilities/MinGW/v3.4.5/bin/g++ ; # using gcc : 4.3 : C:/Utilities/MinGW/v4.3.0/bin/g++ ; # using gcc : 4.4 : C:/Utilities/MinGW/v4.4.0/bin/g++ ; # using gcc : 4.5 : C:/Utilities/MinGW/v4.5.2-1/bin/g++ ; # using gcc : 4.6 : C:/Utilities/MinGW/v4.6.2-1/bin/g++ ; # using gcc : 4.7 : C:/Utilities/MinGW/v4.7.2-1/bin/g++ ; # using gcc : 4.8 : C:/Utilities/mingw-w64/i686-4.8.5-posix-dwarf-rt_v4-rev0/mingw32/bin/g++ : <cxxflags>-ftrack-macro-expansion=0 ; # using gcc : 4.8x64 : C:/Utilities/mingw-w64/x86_64-4.8.5-posix-seh-rt_v4-rev0/mingw64/bin/g++ : <cxxflags>-ftrack-macro-expansion=0 ; # using gcc : 4.9 : C:/Utilities/mingw-w64/i686-4.9.3-posix-dwarf-rt_v4-rev0/mingw32/bin/g++ : <cxxflags>-ftrack-macro-expansion=0 ; # using gcc : 4.9x64 : C:/Utilities/mingw-w64/x86_64-4.9.3-posix-seh-rt_v4-rev0/mingw64/bin/g++ : <cxxflags>-ftrack-macro-expansion=0 ; # using gcc : 5.1 : C:/Utilities/mingw-w64/i686-5.1.0-posix-dwarf-rt_v4-rev0/mingw32/bin/g++ : <cxxflags>-Wno-unused-local-typedefs <cxxflags>-ftrack-macro-expansion=0 ; # using gcc : 5.1x64 : C:/Utilities/mingw-w64/x86_64-5.1.0-posix-seh-rt_v4-rev0/mingw64/bin/g++ : <cxxflags>-Wno-unused-local-typedefs <cxxflags>-ftrack-macro-expansion=0 ;
# ------------------- # MSVC configuration. # -------------------
# Configure msvc (default version, searched for in standard locations and PATH). using msvc ;
using xsltproc ; using boostbook : "C:/Utilities/Docbook/xsl" : "C:/Utilities/Docbook/xml" ; using doxygen ; using fop : "C:/Utilities/RenderX/XEP/xep.bat" : "C:/Program Files (x86)/Java/jre7" ; using quickbook ; using auto-index : C:/Programming/VersionControl/modular-boost/tools/auto_index/build/auto_index.exe ;
using python : 2.7 : C:/Utilities/Python278_32 ;
# using clang : 3.4 : C:/Utilities/LLVM/341/bin/clang++ # : # <warnings>on # ; # using clang : 3.5 : C:/Utilities/LLVM/352/bin/clang++ # : # <warnings>on # <cxxflags>-Wno-dll-attribute-on-redeclaration # ; # using clang : 3.6 : C:/Utilities/LLVM/362/bin/clang++ # : # <warnings>on # <cxxflags>-Wno-unused-local-typedef # <cxxflags>-Wno-dll-attribute-on-redeclaration # ; # using clang : 3.8 : C:/Programming/VersionControl/bninja_installed_clang/bin/clang++ # : # <warnings>on # <cxxflags>-D__MINGW_FORCE_SYS_INTRINS # <cxxflags>-Wno-unused-local-typedef # <cxxflags>-Wno-dll-attribute-on-redeclaration # ;
All other user-config.jam files are just variations of the above with the appropriate line uncommented for whatever toolset I am using. They each have a name such as user-config.gcc-5.1 etc. In my batch file, which is invoked with a toolset name ( among other things ), I do two things: 1) Erase the current user-config.jam, which is just a symbolic line, if it exists, and create a symbolic link of user-config.jam to the appropriate toolset version I want to use. 2) Set the Windows PATH according to the appropriate toolset I want to use ( VC++ is ignored since Boost build takes care of that ). Then b2 is invoked accordingly. It has the correct user-config.jam and the correct Windows PATH for the toolset. I tried other schemes in the past but always ran into problems with multiple toolsets of gcc and clang on Windows because of Boost build's invocation of any toolset it sees in user-config.jam. By manipulating user-config.jam so that only one compiler toolset exists when Boost build sees it I was able to workaround such problems.