Choosing vc++ setup for 14.1

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Choosing vc++ setup for 14.1

Boost - Build mailing list
In my user_config.jam I have for msvc-14.1:

using msvc : 14.1 ;
using msvc : 14.1c14 : : <cxxflags>"/std:c++14" ;
using msvc : 14.1c17 : : <cxxflags>"/std:c++latest" ;

If I invoke b2 with "toolset=msvc-14.1" the msvc-setup.bat shows:

REM "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
SET CommandPromptType=Native
SET DevEnvDir=C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\Common7\IDE\

among many other lines, which is certainly correct for vc++ 14.1. But if
I invoke b2 with "toolset=msvc-14.1c14" or "toolset=msvc-14.1c17" the
msvc-setup.bat shows:

REM "C:\Program Files (x86)\Microsoft Visual Studio
14.0\VC\vcvarsall.bat" x86
SET DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio
14.0\Common7\IDE\

which is the setup for msvc-14.0 and not msvc-14.1.

Is this a known bug or is my usage of the msvc toolset incorrect ? I am
able to use the pattern above to invoke other toolsets ( gcc, clang,
intel ) with different cxxflags.








_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Choosing vc++ setup for 14.1

Boost - Build mailing list
AMDG

On 10/22/2018 10:55 AM, Edward Diener via Boost-build wrote:

> In my user_config.jam I have for msvc-14.1:
>
> using msvc : 14.1 ;
> using msvc : 14.1c14 : : <cxxflags>"/std:c++14" ;
> using msvc : 14.1c17 : : <cxxflags>"/std:c++latest" ;
>
> If I invoke b2 with "toolset=msvc-14.1" the msvc-setup.bat shows:
>
> REM "C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
> SET CommandPromptType=Native
> SET DevEnvDir=C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\IDE\
>
> among many other lines, which is certainly correct for vc++ 14.1. But if
> I invoke b2 with "toolset=msvc-14.1c14" or "toolset=msvc-14.1c17" the
> msvc-setup.bat shows:
>
> REM "C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\VC\vcvarsall.bat" x86
> SET DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio
> 14.0\Common7\IDE\
>
> which is the setup for msvc-14.0 and not msvc-14.1.
>
> Is this a known bug or is my usage of the msvc toolset incorrect ? I am
> able to use the pattern above to invoke other toolsets ( gcc, clang,
> intel ) with different cxxflags.
>

msvc depends on the version to find the location
of the compiler.  Mangling the version prevents
this from working correctly.  Just pass cxxstd=14
or cxxstd=17 to b2 when building.

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Choosing vc++ setup for 14.1

Boost - Build mailing list
On 10/22/2018 1:24 PM, Steven Watanabe via Boost-build wrote:

> AMDG
>
> On 10/22/2018 10:55 AM, Edward Diener via Boost-build wrote:
>> In my user_config.jam I have for msvc-14.1:
>>
>> using msvc : 14.1 ;
>> using msvc : 14.1c14 : : <cxxflags>"/std:c++14" ;
>> using msvc : 14.1c17 : : <cxxflags>"/std:c++latest" ;
>>
>> If I invoke b2 with "toolset=msvc-14.1" the msvc-setup.bat shows:
>>
>> REM "C:\Program Files (x86)\Microsoft Visual
>> Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
>> SET CommandPromptType=Native
>> SET DevEnvDir=C:\Program Files (x86)\Microsoft Visual
>> Studio\2017\Community\Common7\IDE\
>>
>> among many other lines, which is certainly correct for vc++ 14.1. But if
>> I invoke b2 with "toolset=msvc-14.1c14" or "toolset=msvc-14.1c17" the
>> msvc-setup.bat shows:
>>
>> REM "C:\Program Files (x86)\Microsoft Visual Studio
>> 14.0\VC\vcvarsall.bat" x86
>> SET DevEnvDir=C:\Program Files (x86)\Microsoft Visual Studio
>> 14.0\Common7\IDE\
>>
>> which is the setup for msvc-14.0 and not msvc-14.1.
>>
>> Is this a known bug or is my usage of the msvc toolset incorrect ? I am
>> able to use the pattern above to invoke other toolsets ( gcc, clang,
>> intel ) with different cxxflags.
>>
>
> msvc depends on the version to find the location
> of the compiler.  Mangling the version prevents
> this from working correctly.  Just pass cxxstd=14
> or cxxstd=17 to b2 when building.

There are more flags I would like to pass than just cxxstd for different
invocations and you are saying I need to pass them manually all the time
using a single 'using' declaration for a particular version of msvc.
That is also a bit of a pain since I must also pass any flags, which
contain the colon character, in quotes since b2 treats the colon in some
special way. Could not Boost Build logic parse the version number from
any cruft that comes after it by looking for a non-numeric non-dot as
the end of the version number, and just use that version number to
determine the msvc-setup ? In other words, for example, Boost Build
parses 14.1 as release 14.1 but parses 14.1c14 as release 14 for the
purpose of creating the correct msvc-setup.bat. How hard would it really
be to correct the latter to release 14.1 ?

>
> In Christ,
> Steven Watanabe

_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
Reply | Threaded
Open this post in threaded view
|

Re: Choosing vc++ setup for 14.1

Boost - Build mailing list
AMDG

On 10/22/2018 11:53 AM, Edward Diener via Boost-build wrote:

> On 10/22/2018 1:24 PM, Steven Watanabe via Boost-build wrote:
>> On 10/22/2018 10:55 AM, Edward Diener via Boost-build wrote:
>> <snip>
>> msvc depends on the version to find the location
>> of the compiler.  Mangling the version prevents
>> this from working correctly.  Just pass cxxstd=14
>> or cxxstd=17 to b2 when building.
>
> There are more flags I would like to pass than just cxxstd for different
> invocations and you are saying I need to pass them manually all the time
> using a single 'using' declaration for a particular version of msvc.

Your other thread is on the right track.

> That is also a bit of a pain since I must also pass any flags, which
> contain the colon character, in quotes since b2 treats the colon in some
> special way.

':' is used to separate arguments.

> Could not Boost Build logic parse the version number from
> any cruft that comes after it by looking for a non-numeric non-dot as
> the end of the version number, and just use that version number to
> determine the msvc-setup ? In other words, for example, Boost Build
> parses 14.1 as release 14.1 but parses 14.1c14 as release 14 for the
> purpose of creating the correct msvc-setup.bat. How hard would it really
> be to correct the latter to release 14.1 ?
>

Actually, you're probably hitting the final fallback
of searching PATH.  All the code for finding the
path based on the version number requires an exact match.

In Christ,
Steven Watanabe
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build