Re: [CMake] Boost_DIR

2012-09-05 Thread David Doria
On Wed, Jan 11, 2012 at 5:55 AM, Daniel Dekkers d.dekk...@cthrough.nl wrote:
 Hi, does anyone know what this “Boost_DIR” variable is from the
 findBoost.cmake module? And why it is never found?

 Everything works well, I use BOOST_ROOT to set the path to the Boost
 distribution, just curious.

 Daniel

I would like to revive this question.

When I do this:

FIND_PACKAGE(Boost 1.51 COMPONENTS program_options required)

I see a variable Boost_DIR that gets set to Boost_DIR-NOTFOUND, even
though Boost_INCLUDE_DIR, Boost_LIBRARY_DIRS, and a whole bunch of
other variables are set correctly, and the project builds correctly.
Is there something else you have to do to get Boost_DIR to not say
NOTFOUND?

Thanks,

David
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost_DIR

2012-09-05 Thread Klaim - Joël Lamotte
I might be wrong but my understanding is that it's the other way arround:
you provide Boost_DIR (root of your boost installation) and it finds the
rest itself.
I've been using it like that. I have a custom build of boost in a specific
directory and an environnement variable Boost_DIR set  to it. I also set
Boost_ROOT to be sure because previous versions of CMake
would look for it.

Joel Lamotte
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Boost_DIR

2012-09-05 Thread David Doria
On Wed, Sep 5, 2012 at 2:16 PM, Klaim - Joël Lamotte mjkl...@gmail.com wrote:
 I might be wrong but my understanding is that it's the other way arround:
 you provide Boost_DIR (root of your boost installation) and it finds the
 rest itself.
 I've been using it like that. I have a custom build of boost in a specific
 directory and an environnement variable Boost_DIR set  to it. I also set
 Boost_ROOT to be sure because previous versions of CMake
 would look for it.

 Joel Lamotte


Joel,

I tried that -

with

export Boost_DIR=/home/doriad/build/Boost_1_51/

in my ~/.profile

and using:

FIND_PACKAGE(Boost 1.51)

ccmake still shows:

 Boost_DIR   =*Boost_DIR-NOTFOUND

But as I mentioned,  Boost_INCLUDE_DIR and Boost_LIBRARY_DIRS are set
correctly, and everything builds fine. It is just terribly confusing
for one of the first things a user sees in ccmake is
Boost_DIR-NOTFOUND, even though everything is configured properly!

David
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost_DIR

2012-09-05 Thread David Cole
On Wed, Sep 5, 2012 at 2:24 PM, David Doria daviddo...@gmail.com wrote:
 On Wed, Sep 5, 2012 at 2:16 PM, Klaim - Joël Lamotte mjkl...@gmail.com 
 wrote:
 I might be wrong but my understanding is that it's the other way arround:
 you provide Boost_DIR (root of your boost installation) and it finds the
 rest itself.
 I've been using it like that. I have a custom build of boost in a specific
 directory and an environnement variable Boost_DIR set  to it. I also set
 Boost_ROOT to be sure because previous versions of CMake
 would look for it.

 Joel Lamotte


 Joel,

 I tried that -

 with

 export Boost_DIR=/home/doriad/build/Boost_1_51/

 in my ~/.profile

 and using:

 FIND_PACKAGE(Boost 1.51)

 ccmake still shows:

  Boost_DIR   =*Boost_DIR-NOTFOUND

 But as I mentioned,  Boost_INCLUDE_DIR and Boost_LIBRARY_DIRS are set
 correctly, and everything builds fine. It is just terribly confusing
 for one of the first things a user sees in ccmake is
 Boost_DIR-NOTFOUND, even though everything is configured properly!

 David
 --

 Powered by www.kitware.com

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

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

 Follow this link to subscribe/unsubscribe:
 http://www.cmake.org/mailman/listinfo/cmake


That variable is never set by FindBoost. It must be find_package
internally setting that since it never found a BoostConfig.cmake file.
I agree that it's confusing, but there are several different ways to
build/install boost out in the wild, and FindBoost tries to
accommodate all of them, even the installations without any
BoostConfig file. (In my view, it's unfortunate that there are quite
so many different ways of installing boost.)

It's just one of the things I think you get used to with building a
CMake project that uses boost...

Maybe the FindBoost maintainers will chime in here, too. Perhaps
there's a way to mark the variable INTERNAL when it finds a boost that
has no config file.

If not, though, myabe you could just do a mark_as_advanced() on it
so it gets hidden from the view of the users of your project.


Cheers,
David C.
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Boost_DIR

2012-01-11 Thread Daniel Dekkers
Hi, does anyone know what this Boost_DIR variable is from the
findBoost.cmake module? And why it is never found? 

Everything works well, I use BOOST_ROOT to set the path to the Boost
distribution, just curious.

Daniel

--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake