Hi Matt,

1) (... set boost_root ...)
> 2) FIND_PACKAGE(Boost 1.57 COMPONENTS log thread filesystem system)
>

If you're using CMake >= 3.0, then there's a Boost_NAMESPACE variable you
can set that will cause the find module look for mangled library names line
myboostnamespace_datetime instead of boost_datetime.  You can generate a
source tree with an alternate namespace using the boost bcp tool.  I know
that doesn't seem to be your issue at the moment but it could help in
making sure your system boost doesn't get found.



> 3) (... build boost if it Boost_FOUND is 0)
>

Unrelated to your issue, but in general, when testing boolean variables in
CMake, it's best to treat them as a true/false value instead of integers or
strings.  So instead of "if(Boost_FOUND EQUAL 0)", use "if(NOT
Boost_FOUND)".  The reasoning is that there are many different ways to
create true/false boolean values in cmake. For example, a false boolean
value can be represented as NO, 0, FALSE, OFF, "", etc. By just letting the
variable act as a boolean, it streamlines the code needing to deal with it.



> 4) FIND_PACKAGE(Boost 1.57 REQUIRED COMPONENTS log thread filesystem
> system)
>

>From what I can tell, it doesn't look like you set an updated BOOST_ROOT to
the install prefix of the newly built boost, i.e. ${APT_BOOST_BIN}.
Without that, it's just going to look in the same places as before.

Also try setting Boost_DEBUG=ON before the find package calls.  This will
output some additional debugging information for the find module regarding
what and where it's actually searching for.
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to