Re: [CMake] Patch for FindBoost.cmake

2009-09-09 Thread Joseph Garvin
I must have specified the order of files backwards when I made the patch,
the issue is that *currently* in 2.6.4, 2 hyphens happen, my patch is meant
to remove hyphens. Looking at trunk though it appears the problem was
already found.

On Tue, Sep 8, 2009 at 3:34 PM, Andreas Pakulat ap...@gmx.de wrote:

 On 08.09.09 13:47:56, Joseph Garvin wrote:
  Without this patch FindBoost.cmake will look for the wrong filenames
  when linking against a release build of boost. For debug it looks for
  the correct names, but for release it adds spurious hyphens. It looks
  like the hyphens used to be necessary, then the code changed and
  someone changed debug to match to the change but forgot to update
  release.
 
  I'd love to see this in 2.6.5 so I don't have to ship a
  FindBoost.cmake replacement with my app :P

 I don't see why this patch would be necessary. The
 boost_(MULTITHREAD|STATIC|ABI|COMPILER) variables already start with a
 hyphen, so your patch will add 2 hyphens to the names that are being
 searched.

 There's a difference between the debug and the release find_library
 calls, but thats just adding _boost_ABI_TAG in the debug-case.

 This is with CMake from the 2.6 branch

 Andreas

 --
 It may or may not be worthwhile, but it still has to be done.
 ___
 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

___
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] Patch for FindBoost.cmake

2009-09-08 Thread Andreas Pakulat
On 08.09.09 13:47:56, Joseph Garvin wrote:
 Without this patch FindBoost.cmake will look for the wrong filenames
 when linking against a release build of boost. For debug it looks for
 the correct names, but for release it adds spurious hyphens. It looks
 like the hyphens used to be necessary, then the code changed and
 someone changed debug to match to the change but forgot to update
 release.
 
 I'd love to see this in 2.6.5 so I don't have to ship a
 FindBoost.cmake replacement with my app :P

I don't see why this patch would be necessary. The
boost_(MULTITHREAD|STATIC|ABI|COMPILER) variables already start with a
hyphen, so your patch will add 2 hyphens to the names that are being
searched.

There's a difference between the debug and the release find_library
calls, but thats just adding _boost_ABI_TAG in the debug-case.

This is with CMake from the 2.6 branch

Andreas

-- 
It may or may not be worthwhile, but it still has to be done.
___
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] Patch to FindBoost.cmake.

2007-08-01 Thread Andreas Schneider
Andreas Pakulat wrote:
 On 31.07.07 15:11:33, Mike Jackson wrote:
 I had my own home grown FindBoost.cmake that I have been using but I wanted 
 to 
 start using someone elses in the hopes that it would get put into the cmake 
 distribution.. I was looking at the above FindBoost.cmake and the thing that 
 I 
 seemed to have noticed was that my app would end up linking against ALL the 
 boost libraries. I usually only link against 3 of them..
 
 I didn't recheck after Andreas Schneider comitted the change, but now
 you should be able to do
 
 target_link_libraries(XMLText ${BOOST_FOO_LIBRARY} ${BOOST_BAR_LIBRARY})
 

This is documented in at the top of the FindBoost.cmake file now.

http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake

 instead of Boost_LIBRARIES. Its quite natural IMHO to have
 Boost_LIBRARIES include all boost libs and individual variables for each
 lib. And AFAIK thats how CMake Module's are supposed to work (somebody
 may correct me if I'm wrong here)
 
 Andreas
 

-- andreas

-- 
http://www.cynapses.org/ - cybernetic synapses




signature.asc
Description: OpenPGP digital signature
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Patch to FindBoost.cmake.

2007-08-01 Thread Miguel A. Figueroa-Villanueva
On 8/1/07, Andreas Schneider [EMAIL PROTECTED] wrote:
 Andreas Pakulat wrote:
  On 31.07.07 15:11:33, Mike Jackson wrote:
  I had my own home grown FindBoost.cmake that I have been using but I 
  wanted to
  start using someone elses in the hopes that it would get put into the cmake
  distribution.. I was looking at the above FindBoost.cmake and the thing 
  that I
  seemed to have noticed was that my app would end up linking against ALL the
  boost libraries. I usually only link against 3 of them..
 
  I didn't recheck after Andreas Schneider comitted the change, but now
  you should be able to do
 
  target_link_libraries(XMLText ${BOOST_FOO_LIBRARY} ${BOOST_BAR_LIBRARY})
 

 This is documented in at the top of the FindBoost.cmake file now.

 http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake

  instead of Boost_LIBRARIES. Its quite natural IMHO to have
  Boost_LIBRARIES include all boost libs and individual variables for each
  lib. And AFAIK thats how CMake Module's are supposed to work (somebody
  may correct me if I'm wrong here)

Well, I don't think this is how CMake Modules are supposed to work,
but somebody may correct me if I'm wrong ;) This is meant to be a
discussion on cmake modules interface in an attempt to clarify issues
and not a critique on this particular package. As it is I think it is
pretty good.

I think that providing a default to link to all libraries found is ok
if the user doesn't provide any component specification. That is:

find_package(Boost)

In this case, I guess it is reasonable to set Boost_FOUND if at least
one library or the include dir (if there are still parts of boost that
are only header files) is found. Also, setting Boost_LIBRARIES to all
available libs is ok. Then if the user wants some specific libs there
is the Boost_thread_FOUND/Boost_thread_LIBRARY variables.

I believe this is mostly how the current FindBoost.cmake
(http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake)
works except for the mixed case names and the use of an AND rather
than an OR in the following:

  if (BOOST_INCLUDE_DIRS AND BOOST_LIBRARIES)
set(BOOST_FOUND TRUE)
  endif (BOOST_INCLUDE_DIRS AND BOOST_LIBRARIES)

Again this is appropriate only if boost has to link with at least one
library to work.

Now, all of that is based on the simple call: find_package(Boost).

However, I would expect that when called like:

find_package(Boost COMPONENTS regex  serialization)

then:

- Boost_FOUND: set to TRUE if Boost_regex_FOUND and
Boost_serialization_FOUND are TRUE and Boost_INCLUDE_DIRS is set.
- Boost_LIBRARIES: set to Boost_regex_LIBRARY and Boost_serialization_LIBRARY

Just my thoughts...

--Miguel
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Patch to FindBoost.cmake.

2007-07-31 Thread Mike Jackson



On Jul 24, 2007, at 8:29 AM, Andreas Schneider wrote:


Andreas Pakulat wrote:

On 24.07.07 07:35:34, gga wrote:

Andreas Schneider wrote:
I've rewritten the FindBoost.cmake from scratch some time ago.  
And we
have improved it at OpenWengo. I suggest to ship this version in  
CMake.


http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/ 
FindBoost.cmake


+1 for this.  This is without a doubt the best FindBoost.cmake  
I've seen

so far.


Looks pretty good and would obsolete the FindBoostLibs.cmake in KDE's
kdevplatform module. There's only one thing I miss: Documentation for
the individual

BOOST_FOO_LIBRARY

variables, I don't think many people want to link against _all_ boost
libs.


Committed :)



Andreas



-- andreas

--
http://www.cynapses.org/ - cybernetic synapses



I had my own home grown FindBoost.cmake that I have been using but I  
wanted to start using someone elses in the hopes that it would get  
put into the cmake distribution.. I was looking at the above  
FindBoost.cmake and the thing that I seemed to have noticed was that  
my app would end up linking against ALL the boost libraries. I  
usually only link against 3 of them..


In my original module I had it setup so I had command like the  
following:


# --- Find the Boost stuff
SET (Boost_USE_UNIT_TEST_FRAMEWORK TRUE)
SET (Boost_USE_TEST_EXEC_MONITOR TRUE)
INCLUDE(${PROJECT_SOURCE_DIR}/../../Resources/FindBoost.cmake)
LINK_DIRECTORIES(${Boost_LIBRARY_DIR})

ADD_EXECUTABLE( XMLTest ${XML_TEST_SRCS} )
TARGET_LINK_LIBRARIES (XMLTest ${Boost_LIBRARIES} )

which would let me only link against the libraries that I choose.  Is  
this something that the maintainers would consider implementing? I  
can probably add it and submit an update FindBoost.cmake if needed?

 Or if not (code style?) why not?

Thanks
--
Mike Jackson   Senior Research Engineer
Innovative Management  Technology Services

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Patch to FindBoost.cmake.

2007-07-31 Thread Andreas Pakulat
On 31.07.07 15:11:33, Mike Jackson wrote:
 I had my own home grown FindBoost.cmake that I have been using but I wanted 
 to 
 start using someone elses in the hopes that it would get put into the cmake 
 distribution.. I was looking at the above FindBoost.cmake and the thing that 
 I 
 seemed to have noticed was that my app would end up linking against ALL the 
 boost libraries. I usually only link against 3 of them..

I didn't recheck after Andreas Schneider comitted the change, but now
you should be able to do

target_link_libraries(XMLText ${BOOST_FOO_LIBRARY} ${BOOST_BAR_LIBRARY})

instead of Boost_LIBRARIES. Its quite natural IMHO to have
Boost_LIBRARIES include all boost libs and individual variables for each
lib. And AFAIK thats how CMake Module's are supposed to work (somebody
may correct me if I'm wrong here)

Andreas

-- 
Your temporary financial embarrassment will be relieved in a surprising manner.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Patch to FindBoost.cmake.

2007-07-24 Thread Andreas Schneider
Václav Haisman wrote:
 Hi,

Hello,

 the FindBoost.cmake does not detect Boost installed by binary package
 from the Boost Consulting. The patch attached to
 http://www.cmake.org/Bug/bug.php?op=showbugid=4881pos=0 fixes it for me.

I've rewritten the FindBoost.cmake from scratch some time ago. And we
have improved it at OpenWengo. I suggest to ship this version in CMake.

http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake

Yes, I would maintain the Module.

-- andreas

 
 --
 VH
 
 
 
 
 
 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake

-- 
http://www.cynapses.org/ - cybernetic synapses






signature.asc
Description: OpenPGP digital signature
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Patch to FindBoost.cmake.

2007-07-24 Thread gga
Andreas Schneider wrote:
 
 I've rewritten the FindBoost.cmake from scratch some time ago. And we
 have improved it at OpenWengo. I suggest to ship this version in CMake.
 
 http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake
 

+1 for this.  This is without a doubt the best FindBoost.cmake I've seen
so far.

-- 
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Kubuntu Edgy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Patch to FindBoost.cmake.

2007-07-24 Thread Václav Haisman
Andreas Schneider wrote:
 Václav Haisman wrote:
 Hi,
 
 Hello,
 
 the FindBoost.cmake does not detect Boost installed by binary package
 from the Boost Consulting. The patch attached to
 http://www.cmake.org/Bug/bug.php?op=showbugid=4881pos=0 fixes it for me.
 
 I've rewritten the FindBoost.cmake from scratch some time ago. And we
 have improved it at OpenWengo. I suggest to ship this version in CMake.
 
 http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake
 
 Yes, I would maintain the Module.
 
   -- andreas
The script works fine for me. It is definitely better than mine hack.

--
VH




signature.asc
Description: OpenPGP digital signature
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Patch to FindBoost.cmake.

2007-07-24 Thread Andreas Schneider
Andreas Pakulat wrote:
 On 24.07.07 07:35:34, gga wrote:
 Andreas Schneider wrote:
 I've rewritten the FindBoost.cmake from scratch some time ago. And we
 have improved it at OpenWengo. I suggest to ship this version in CMake.

 http://cmake-modules.googlecode.com/svn/trunk/Modules/Boost/FindBoost.cmake

 +1 for this.  This is without a doubt the best FindBoost.cmake I've seen
 so far.
 
 Looks pretty good and would obsolete the FindBoostLibs.cmake in KDE's
 kdevplatform module. There's only one thing I miss: Documentation for
 the individual
 
 BOOST_FOO_LIBRARY
 
 variables, I don't think many people want to link against _all_ boost
 libs.

Committed :)

 
 Andreas
 

-- andreas

-- 
http://www.cynapses.org/ - cybernetic synapses




signature.asc
Description: OpenPGP digital signature
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake