Boost logo

Boost Testing :

Subject: Re: [Boost-testing] setup to test mngw- ...
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2017-10-22 21:01:10


On 19/10/2017 0:03, Robert Ramey via Boost-Testing wrote:

> I was really hoping that installing some version of MSYS with it's shell
> would give me similar results to cygwin. But alas, there are multiple
> versions of this just as there are for the mngw compiler.  It appears
> that there is the "official" one and the "better" one.  It's quite
> confusing.  But your explanation has encouraged me to investigate this
> further.

Running mingw is really hard due to path issues. Here's what I do to
configure regressions runners:

I install a Mingw-w64 compiler. Say in:

C:\Programs\mingw-builds\i686-7.1.0-posix-dwarf-rt_v5-rev2\

then I put a file named gcc-7.1.bat in:

C:\Programs\mingw-builds\i686-7.1.0-posix-dwarf-rt_v5-rev2\mingw32\bin\gcc-7.1.bat

The .bat file contains the commands:

@echo off
set
PATH=C:\Programs\mingw-builds\i686-7.1.0-posix-dwarf-rt_v5-rev2\mingw32\bin;%PATH%
g++ %*

Finally I add the compiler to user-config.jam with several c++ standard
compliance versions:

#GCC 7.1
using gcc : 7.1c++17 :
C:/Programs/mingw-builds/i686-7.1.0-posix-dwarf-rt_v5-rev2/mingw32/bin/gcc-7.1.bat
: <cxxflags>"-pipe -fmax-errors=1 -std=c++17 -Wall -Wextra -pedantic
-Wno-deprecated-declarations -Wno-long-long -Werror" <linkflags>"-pipe" ;
using gcc : 7.1c++14 :
C:/Programs/mingw-builds/i686-7.1.0-posix-dwarf-rt_v5-rev2/mingw32/bin/gcc-7.1.bat
: <cxxflags>"-pipe -fmax-errors=1 -std=c++14 -Wall -Wextra -pedantic
-Wno-deprecated-declarations -Wno-long-long -Werror" <linkflags>"-pipe" ;
using gcc : 7.1c++11 :
C:/Programs/mingw-builds/i686-7.1.0-posix-dwarf-rt_v5-rev2/mingw32/bin/gcc-7.1.bat
: <cxxflags>"-pipe -fmax-errors=1 -std=c++11 -Wall -Wextra -pedantic
-Wno-deprecated-declarations -Wno-long-long -Werror" <linkflags>"-pipe" ;
using gcc : 7.1c++03 :
C:/Programs/mingw-builds/i686-7.1.0-posix-dwarf-rt_v5-rev2/mingw32/bin/gcc-7.1.bat
: <cxxflags>"-pipe -fmax-errors=1 -std=c++03 -Wall -Wextra -pedantic
-Wno-deprecated-declarations -Wno-long-long -Werror" <linkflags>"-pipe" ;

Then I can run tests as:

c:\Data\Libs\boost\libs\move\test>..\..\..\b2 toolset=gcc-7.1c++17

I hope it helps.

Ion


Boost-testing list run by mbergal at meta-comm.com