Subject: Re: [boost] Encoding address-model in library names
From: P F (pfultz2_at_[hidden])
Date: 2017-07-07 01:46:46
> On Jul 5, 2017, at 5:32 PM, Vinnie Falco via Boost <boost_at_[hidden]> wrote:
> On Wed, Jul 5, 2017 at 3:30 PM, Stefan Seefeld via Boost
> <boost_at_[hidden]> wrote:
>> Because they could use distinct installation prefixes to avoid conflicts.
> As a developer working primarily on Windows who regularly builds both
> 32-bit and 64-bit address models, its a hassle to have different
> installation prefixes. There's no "standard" place for link libraries
> on Windows so I have to define BOOST_ROOT in my environment.
You should just need to define CMAKE_PREFIX_PATH as that is the variable you use in cmake to tell it where dependencies are(even on windows). Using BOOST_ROOT is more for refining how boost is found when multiple version exists in the CMAKE_PREFIX_PATH. So if you install all your dependencies(ie boost, openssl, zlib, etc) in some directory say C:\deps32 and C:\deps64 then all you need to do is set the CMAKE_PREFIX_PATH for each version:
alias cmake32=âcmake -G \'Visual Studio 14 2015\' -DCMAKE_PREFIX_PATH=C:\deps32 -DCMAKE_INSTALL_PREFIX=C:\deps32â
alias cmake64=âcmake -G \'Visual Studio 14 2015 Win64\' -DCMAKE_PREFIX_PATH=C:\deps64 -DCMAKE_INSTALL_PREFIX=C:\deps64â
Then cmake32/cmake64 sets up cmake with the different address models, and there is no need to worry about setting custom variables such as BOOST_ROOT. You just create separate build trees for each variant instead.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk