[CMake] Expected boost path structure.

David Cole david.cole at kitware.com
Thu Feb 17 11:31:46 EST 2011


On Thu, Feb 17, 2011 at 11:25 AM, John Drescher <drescherjm at gmail.com> wrote:
> On Thu, Feb 17, 2011 at 11:05 AM, David Cole <david.cole at kitware.com> wrote:
>> Are you escaping the "\" characters, like this?
>> set(BOOST_ROOT "X:\\32bit\\VC ...")
>>
>> Or using the CMake convention "/" as a path separator character?
>> set(BOOST_ROOT "X:/32bit/VC ...")
>> (this is the one you should be doing...)
>>
> I see. I set an BOOST_ROOT as an environment variable instead of a
> CMake variable. It works when I set BOOST_ROOT as a CMake variable.
>
>> What version of CMake?
>>
> 2.8.4
>
> John
>

According to FindBoost.cmake:

  if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "")
    set(BOOST_ROOT $ENV{BOOST_ROOT})
  endif()

So, it should work with an ENV var, too. But the way this is phrased,
it would have to have forward slashes "/" and no spaces in it for it
to work.


More information about the CMake mailing list