Re: [CMake] Boost 1.70.0 -- FindBoost issues? No linker libraries found (Mateusz Loskot)

2019-04-16 Thread Andrew Maclean
Thank you so much, this works perfectly.


>
> -- Forwarded message --
> From: Mateusz Loskot 
> To: cmake@cmake.org
> Cc:
> Bcc:
> Date: Tue, 16 Apr 2019 01:10:44 +0200
> Subject: Re: [CMake] Boost 1.70.0 -- FindBoost issues? No linker libraries
> found
> On Tue, 16 Apr 2019 at 01:01, Andrew Maclean 
> wrote:
> >
> >  In build.ninja all the requested linker libraries are there e.g.
> /usr/local/lib/libboost_date_time.so>
> > Boost 1.70
> > When using Boost 1.70 all I get in the CMakeLists.txt file are entries
> like:
> > //The directory containing a CMake configuration file for
> boost_date_time.
> > boost_date_time_DIR:PATH=/usr/local/lib/cmake/boost_date_time-1.70.0
>
> Installation of Boost 1.70 generates and deploys a brand new
> BoostConfig.cmake
> machinery which is still being tested.
>
> Try setting -DBoost_NO_BOOST_CMAKE=ON to get the old FindBoost.cmake
> behaviour
> https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake#L238
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>
>
>
>
> --
___
Andrew J. P. Maclean

___
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost 1.70.0 -- FindBoost issues? No linker libraries found

2019-04-15 Thread Mateusz Loskot
On Tue, 16 Apr 2019 at 01:01, Andrew Maclean  wrote:
>
>  In build.ninja all the requested linker libraries are there e.g. 
> /usr/local/lib/libboost_date_time.so>
> Boost 1.70
> When using Boost 1.70 all I get in the CMakeLists.txt file are entries like:
> //The directory containing a CMake configuration file for boost_date_time.
> boost_date_time_DIR:PATH=/usr/local/lib/cmake/boost_date_time-1.70.0

Installation of Boost 1.70 generates and deploys a brand new BoostConfig.cmake
machinery which is still being tested.

Try setting -DBoost_NO_BOOST_CMAKE=ON to get the old FindBoost.cmake behaviour
https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake#L238

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] Boost 1.70.0 -- FindBoost issues? No linker libraries found

2019-04-15 Thread Andrew Maclean
Has anyone else got issues using Boost 1.70 in their code.
I'm using CMake 3.14.2
I have done the usual build/install of Boost in linux and everything seems
to be installed Ok in /usr/local/include and /usr/local lib.
The problem is the no linker libraries are being found.

I use this in my CMakeLists.txt fle:
#
find_package(Boost *1.70.0 *EXACT REQUIRED COMPONENTS
  date_time  filesystem  regex  serialization  system  thread  iostreams
)
#---
I reinstalled Boost 1.69 and changed to *1.69.0* in find_package and
everything builds OK.
*Boost 1.69*
When using 1.69 in CMakeLists.txt file I get expected entries like:
//Boost date_time library (debug)
Boost_DATE_TIME_LIBRARY_DEBUG:FILEPATH=/usr/local/lib/libboost_date_time.so

 In build.ninja all the requested linker libraries are there e.g.
/usr/local/lib/libboost_date_time.so

*Boost 1.70*
When using Boost 1.70 all I get in the CMakeLists.txt file are entries like:
//The directory containing a CMake configuration file for boost_date_time.
boost_date_time_DIR:PATH=/usr/local/lib/cmake/boost_date_time-1.70.0

In build.ninja no linker libraries are listed.

Everything seems in order in /usr/local/lib:
--
-rw-r--r-- 1 root root 160618 Apr 16 07:46 libboost_date_time.a
lrwxrwxrwx 1 root root 28 Apr 16 08:08 libboost_date_time.so ->
libboost_date_t
ime.so.1.70.0

lrwxrwxrwx 1 root root 28 Apr 16 08:08 libboost_date_time.so.1 ->
libboost_date
_time.so.1.70.0

-rwxr-xr-x 1 root root 103672 Apr 16 07:47 libboost_date_time.so.1.69.0
lrwxrwxrwx 1 root root 28 Apr 16 08:08 libboost_date_time.so.1.70 ->
libboost_d
ate_time.so.1.70.0

-rwxr-xr-x 1 root root 103672 Apr 16 08:08 libboost_date_time.so.1.70.0
---

It is also not possible to build in Windows using VS2019 and Boost 1.70.

Regards
   Andrew

-- 
___
Andrew J. P. Maclean

___
-- 

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] Cmake Boost::boost target PRIVATE link, forcing dependency on client

2018-11-27 Thread rmawatson rmawatson
I am having a problem with make 3.12 (windows) and cmake version 3.13.0-rc2 
(linux). I am attempting to link boost headers privately to a static library, 
which is then linked by a client executable, that I do not want to depend on 
boost.

According to the docs, the find_package(Boost) provides a target for the header 
only portion of the boost library, Boost::boost. this is the target I am using, 
and I am linking the target privately, ie

target_link_libraries(testlib PRIVATE Boost::boost)

However a the client testexe which uses testlib from the install dir with 
find_package(testlib)and links it with target_link_libraries(testexe 
testlib::testlib) is causing cmake to search for a Boost dependency for the 
testexe. As this is linked privately, it shouldn't as far as I can see.

Interestingly adding an INTERFACE IMPORTED target in testlib and using this to 
link, and the client no longer needs boost.

find_package(Boost REQUIRED)

add_library(boost INTERFACE IMPORTED)

set_property(TARGET boost PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${Boost_INCLUDE_DIR})
target_link_libraries(testlib
PRIVATE
#using the imported target instead
boost
#Boost::boost)

this is almost identical to the lines in the Find boost source 
here.
 The only difference being the target the properties are set on.

I have a workaround but I would like to know what is going on.

The complete source for the two test projects are availabe 
here.

This is the output from cmake with using the Boost::boost target and the 
INTERFACE IMPORTEDtarget, which works

###using to the provided Boost::boost target

C:\Temp\cmake_boost\testlib\build>cmake ../ 
-DBOOST_ROOT=d:\sdk\boost\boost_1_68_0
-- Boost version: 1.68.0-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/cmake_boost/testlib/build

C:\Temp\cmake_boost\testexe\build>cmake ../ 
-DCMAKE_PREFIX_PATH="C:\Temp\cmake_boost\testlib\build"-- Configuring done
CMake Error at CMakeLists.txt:6 (add_executable):
  Target "test" links to target "Boost::boost" but the target was not found.
  Perhaps a find_package() call is missing for an IMPORTED target, or an
  ALIAS target is missing?-- Generating done
-- Build files have been written to: C:/Temp/cmake_boost/testexe/build



#When using the imported library target.

C:\Temp\cmake_boost\testlib\build>cmake ../ 
-DBOOST_ROOT=d:\sdk\boost\boost_1_68_0
-- Boost version: 1.68.0-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/cmake_boost/testlib/build


C:\Temp\cmake_boost\testexe\build>cmake ../ 
-DCMAKE_PREFIX_PATH="C:\Temp\cmake_boost\testlib\build"-- Configuring done
-- Generating done
-- Build files have been written to: C:/Temp/cmake_boost/testexe/build

Thanks!
-- 

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] Boost CMake support

2018-10-01 Thread Robert Ramey
Boost Library developers are taking a serious look at making Boost more 
friendly for users of CMake.  This discussion is taking place on the 
Boost Developer's mailing list.


https://www.boost.org/community/groups.html

Those who have an interest in this topic are encouraged to observe 
and/or participate.  We would especially welcome help from the CMake team.


Robert Ramey
www.boost.org

--

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-08-09 Thread Wheeler, Gavin via CMake
Hi Chris,

Thanks fort that suggestion too. Right now I have boost integrated using the 
pre-built libs and the program I need it for is working - so I’m loath to 
change it.

However, I’ll keep this for future reference, I’m sure it will come in handy.

Best Regards,

Gavin

From: ch...@simply-italian.co.uk  On Behalf Of 
Chris Wilson
Sent: 08 August 2018 12:29
To: Wheeler, Gavin 
Cc: cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

Hi all,

I solved this problem (or a very similar one) by using a CMake 
superbuild<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fboxbackup%2Fboxbackup%2Fblob%2Fmaster%2Finfrastructure%2Fcmake%2Fwindows%2FCMakeLists.txt&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C15ca36a76a0a473b2b5208d5fd222ce3%7C8370cf1416f34c16b83c724071654356%7C0&sdata=mlCc8Yqqnmxo7yaEg3SzuAg%2FGvYXseuo7WW5YgGkQw4%3D&reserved=0>
 which builds Boost and then my project, like this:

# Version of Boost to download, unpack, and compile Box Backup against:
set(BOOST_VERSION1.62.0)
# Hash of the Boost download file, to be verified after download:
set(BOOST_HASH SHA1=5fd97433c3f859d8cbab1eaed4156d3068ae3648)
...
string(REPLACE "." "_" BOOST_VERSION_UNDERSCORES ${BOOST_VERSION})
ExternalProject_Add(boost
URL 
"http://downloads.sourceforge.net/project/boost/boost/${BOOST_VERSION}/boost_${BOOST_VERSION_UNDERSCORES}.tar.bz2<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdownloads.sourceforge.net%2Fproject%2Fboost%2Fboost%2F%24%7BBOOST_VERSION%7D%2Fboost_%24%7BBOOST_VERSION_UNDERSCORES%7D.tar.bz2&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7C15ca36a76a0a473b2b5208d5fd222ce3%7C8370cf1416f34c16b83c724071654356%7C0&sdata=3jIIq9zc4JfBlW0Owf39zmKTDK%2BW%2FFQsnFcESEryyd0%3D&reserved=0>"
URL_HASH ${BOOST_HASH}
# DOWNLOAD_NO_PROGRESS 1
# Disable automatic updating (untarring) as it's slow and not necessary
UPDATE_DISCONNECTED 1
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E echo "No configure step needed"
BUILD_COMMAND ${CMAKE_COMMAND} -E echo "No build step needed"
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "No install step needed"
)
...
ExternalProject_Add(boxbackup
DEPENDS zlib openssl pcre boost
SOURCE_DIR ${boxbackup_dir}/infrastructure/cmake
CMAKE_ARGS
  -DZLIB_ROOT=${install_dir}
  -DOPENSSL_ROOT_DIR=${install_dir}
  -DPCRE_ROOT=${install_dir}
  -DBOOST_ROOT=${CMAKE_BINARY_DIR}/Source/boost
  -DBOX_SUPPORT_READLINE=OFF
  -DCMAKE_INSTALL_PREFIX=${install_dir}
  -DAPPVEYOR_MODE=1
  -DDEBUG=${DEBUG}
  ${boxbackup_cmake_args}
  ${SUB_CMAKE_EXTRA_ARGS}
INSTALL_COMMAND ${CMAKE_COMMAND} -E echo "No install step needed"
STEP_TARGETS configure build
)

Having set BOOST_ROOT, FindBoost should just work.

In this case, I didn't need to compile any of Boost, only its headers, but if 
you do need to, then you can change its CONFIGURE_COMMAND and BUILD_COMMAND.

Hope this helps.

Thanks, Chris.


On 8 August 2018 at 10:53, Wheeler, Gavin 
mailto:gavin.whee...@kcl.ac.uk>> wrote:
Hi Mateusz,

I absolutely agree - use the latest CMake! That will help fix and bugs and 
ensure it works with more up-to-date versions of Boost.

My cut and paste instructions were from 2 different computers, and the one I 
wrote the mail on has an older version of CMake - I wasn't suggesting people 
purposely use an old version, more to use the steps with the latest version. 
I've just got a new development machine - so now I'm working with new CMake :)

So, if I may, I will add another step...

0. Download and install the latest CMake

Thank-you,

Gavin


-Original Message-
From: CMake [mailto:cmake-boun...@cmake.org<mailto:cmake-boun...@cmake.org>] On 
Behalf Of Mateusz Loskot
Sent: 07 August 2018 17:34
To: cmake@cmake.org<mailto:cmake@cmake.org>
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

On 7 August 2018 at 18:15, Wheeler, Gavin 
mailto:gavin.whee...@kcl.ac.uk>> wrote:
> [...]
> 1.   Look in C:\Program
> Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake

Rule #1: never use CMake older than the latest release!

Rule #2: if you die hard for old CMake, force use of the latest FindBoost.cmake

if (CMAKE_VERSION VERSION_LESS 3.12)
  if (NOT EXISTS "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
message(STATUS "You are using CMake older than 3.10")
message(STATUS "FindBoost.cmake has likely been updated to detect newer or 
even not yet released Boost")
message(STATUS "Downloading FindBoost.cmake from
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2F&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=2ORH%2BnLCBqCDNIwIrs7%2FkcdPZhtP8hYE%2FVKrBe%2FYpDQ%3D&a

Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-08-08 Thread Wheeler, Gavin
Hi Mateusz,

I absolutely agree - use the latest CMake! That will help fix and bugs and 
ensure it works with more up-to-date versions of Boost.

My cut and paste instructions were from 2 different computers, and the one I 
wrote the mail on has an older version of CMake - I wasn't suggesting people 
purposely use an old version, more to use the steps with the latest version. 
I've just got a new development machine - so now I'm working with new CMake :)

So, if I may, I will add another step...

0. Download and install the latest CMake

Thank-you,

Gavin


-Original Message-
From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Mateusz Loskot
Sent: 07 August 2018 17:34
To: cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

On 7 August 2018 at 18:15, Wheeler, Gavin  wrote:
> [...]
> 1.   Look in C:\Program
> Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake

Rule #1: never use CMake older than the latest release!

Rule #2: if you die hard for old CMake, force use of the latest FindBoost.cmake

if (CMAKE_VERSION VERSION_LESS 3.12)
  if (NOT EXISTS "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
message(STATUS "You are using CMake older than 3.10")
message(STATUS "FindBoost.cmake has likely been updated to detect newer or 
even not yet released Boost")
message(STATUS "Downloading FindBoost.cmake from
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2F&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=2ORH%2BnLCBqCDNIwIrs7%2FkcdPZhtP8hYE%2FVKrBe%2FYpDQ%3D&reserved=0
 release branch")
message(STATUS "The auto-download can be disabled with
GIL_DISABLE_FINDBOOST_DOWNLOAD=ON")
file(DOWNLOAD
  
"https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fraw%2Frelease%2FModules%2FFindBoost.cmake&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=W9QJth1ZQZiT2VlDaub2rUgsS8BnhT7Ps5STKlzqma8%3D&reserved=0";
  "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
  endif()
  list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_BINARY_DIR}/cmake)
endif()


The rules work most of the time, unless a lil' bug sneaks in eg.

https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fmerge_requests%2F1731&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=MaRqgu7Rz8TwUvwQD%2FgIfm6bPje3spWfzDwwA%2BIQ5rA%3D&reserved=0
https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.kitware.com%2Fcmake%2Fcmake%2Fissues%2F17701&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=eB9j5AGT7EW1TPeGXHxIyvstvLIjk8NlscleVeOPFJk%3D&reserved=0

Remember, FindBoost.cmake is *always* a step or two behind CMake release.

Best regards,
--
Mateusz Loskot, 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmateusz.loskot.net&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=LyXA5Iv76X0qxQKYT1ts6%2Fvtc%2F2v%2BEa9g778QoL6%2BdI%3D&reserved=0
-- 

Powered by 
https://emea01.safelinks.protection.outlook.com/?url=www.kitware.com&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=%2BUZyhXV9EXuLreYKa2Kx9yAnlzN9X5%2Fpw8%2FeV%2BUrCoE%3D&reserved=0

Please keep messages on-topic and check the CMake FAQ at: 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cmake.org%2FWiki%2FCMake_FAQ&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=L2gB6A4DMwOI%2BwD%2FK2lwDRQf%2BaHJ4K9gi52cYRG2fSk%3D&reserved=0

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

CMake Support: 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fsupport.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Tjljc0Fic6aB7lm2Idu0TOj%2B2MAT8iGNBESYsJ0rqR4%3D&reserved=0
CMake Consulting: 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fconsulting.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Cf685ba542e7849713baa08d5fc83b215%7C8370cf1416f34c16b83c724071654356%7C0&sdata=jeQYQWP0dYxBfc6vF7gSllG3k%2BDxmSjufD8h58SWOkA%3D&reserved=0
CMake Training Courses: 
https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp

Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-08-07 Thread Mateusz Loskot
On 7 August 2018 at 18:15, Wheeler, Gavin  wrote:
> [...]
> 1.   Look in C:\Program
> Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake

Rule #1: never use CMake older than the latest release!

Rule #2: if you die hard for old CMake, force use of the latest FindBoost.cmake

if (CMAKE_VERSION VERSION_LESS 3.12)
  if (NOT EXISTS "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
message(STATUS "You are using CMake older than 3.10")
message(STATUS "FindBoost.cmake has likely been updated to detect
newer or even not yet released Boost")
message(STATUS "Downloading FindBoost.cmake from
https://gitlab.kitware.com/cmake/ release branch")
message(STATUS "The auto-download can be disabled with
GIL_DISABLE_FINDBOOST_DOWNLOAD=ON")
file(DOWNLOAD
  
"https://gitlab.kitware.com/cmake/cmake/raw/release/Modules/FindBoost.cmake";
  "${CMAKE_BINARY_DIR}/cmake/FindBoost.cmake")
  endif()
  list(INSERT CMAKE_MODULE_PATH 0 ${CMAKE_BINARY_DIR}/cmake)
endif()


The rules work most of the time, unless a lil' bug sneaks in eg.

https://gitlab.kitware.com/cmake/cmake/merge_requests/1731
https://gitlab.kitware.com/cmake/cmake/issues/17701

Remember, FindBoost.cmake is *always* a step or two behind CMake release.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-08-07 Thread Wheeler, Gavin
Hi,

Thanks for the suggestions and apologies for my tardiness in getting back on 
this issue. I'm replying with my experiences for other to use as a future 
reference, hopefully they can avoid some of the frustration I've encountered.

I spent half a day on this with two colleagues who are well versed in using 
CMake, and we found a simple solution.

DON'T BOTHER!

"Windows + CMake + source boost "build seems intractable, or at the very least 
intractable enough to basically be impossible, or at any rate just not worth 
bothering with.

If are using Windows and you rate your sanity and time higher than you rate the 
ability to use CMake and a source build of boost together I suggest you do the 
following...


1.   Look in C:\Program Files\CMake\share\cmake-3.9\Modules\FindBoost.cmake

2.   Search for _Boost_KNOWN_VERSIONS

3.   Download the binary build of the newest version listed from 
https://sourceforge.net/projects/boost/files/boost-binaries/

4.   If Windows Defender has a wobbly and your IT policy won't allow you to 
ignore the wobble then move back thorugh older versions until one works

5.   Install the boost to the default location and default settings

6.   Run CMake with the following sort of thing...

find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time 
iostreams)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})


7.   ...relax and make a nice cup of tea

Best Regards,

Gavin


From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Dvir Yitzchaki
Sent: 15 July 2018 08:27
To: Innokentiy Alaytsev ; cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?


I recommend using Hunter package manager:

https://docs.hunter.sh/en/latest/quick-start/boost-components.html<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.hunter.sh%2Fen%2Flatest%2Fquick-start%2Fboost-components.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0&sdata=iwvlHuibo8%2Fu3bGB1woxV5fcI7T6daJRHII5l37dzGc%3D&reserved=0>



Regards,

Dvir



-Original Message-
From: CMake mailto:cmake-boun...@cmake.org>> On Behalf 
Of Innokentiy Alaytsev
Sent: Thursday, July 12, 2018 13:29
To: cmake@cmake.org<mailto:cmake@cmake.org>
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?



Hello!



First of all, I suggest you use Boost imported targets instead of 
Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS and the

target_include_directories() and target_link_libraries() functions. Al this is 
to better support exporting CMake package if you need it. If you do not produce 
CMake package for use in some other projects, then just ignore this advice.



Second, just use  pre-built Boost binaries 
<https://dl.bintray.com/boostorg/release/1.67.0/binaries/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdl.bintray.com%2Fboostorg%2Frelease%2F1.67.0%2Fbinaries%2F&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0&sdata=p7Gr9TztBZhINb3iTb9PZJs0oOSp3fu%2FkR5HtZs624M%3D&reserved=0>>
  . They are just fine. If your Windows Defender finds something in them then 
it's the problem in Windows Defender.



Best regards,

Innokentiy Alaytsev







--

Sent from: 
http://cmake.3232098.n2.nabble.com/<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.3232098.n2.nabble.com%2F&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0&sdata=Bn6BpFHeaEY%2FPICsFuyxhedwJz74DnCqPj6JwX1OCWU%3D&reserved=0>

--



Powered by 
www.kitware.com<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0&sdata=h%2B9%2FVFYma%2BR7EpgKMbW2SK0y8nmoVzSnUgUSauMofWI%3D&reserved=0>



Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cmake.org%2FWiki%2FCMake_FAQ&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0&sdata=8qV0sbl6p82iFJjdrr5BpcU1Gl6fmgB%2Ba%2Bl5TW3xMVU%3D&reserved=0>



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<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fsupport.html&data=01%7C01%7Cgavin.wheeler%40kcl.ac.uk%7Ce36bc216c96b4234004408d5ea267d17%7C8370cf1416f34c16b83c724071654356%7C0&sdata=TnN9QdIdT1U%2Ffpb%2Fco%2BTeQ7FjVnHmT%2BAi61qKo

Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-07-15 Thread Dvir Yitzchaki
I recommend using Hunter package manager:

https://docs.hunter.sh/en/latest/quick-start/boost-components.html



Regards,

Dvir



-Original Message-
From: CMake  On Behalf Of Innokentiy Alaytsev
Sent: Thursday, July 12, 2018 13:29
To: cmake@cmake.org
Subject: Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?



Hello!



First of all, I suggest you use Boost imported targets instead of 
Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS and the

target_include_directories() and target_link_libraries() functions. Al this is 
to better support exporting CMake package if you need it. If you do not produce 
CMake package for use in some other projects, then just ignore this advice.



Second, just use  pre-built Boost binaries 
<https://dl.bintray.com/boostorg/release/1.67.0/binaries/>  . They are just 
fine. If your Windows Defender finds something in them then it's the problem in 
Windows Defender.



Best regards,

Innokentiy Alaytsev







--

Sent from: http://cmake.3232098.n2.nabble.com/

--



Powered by www.kitware.com<http://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:

https://cmake.org/mailman/listinfo/cmake
-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-07-12 Thread Innokentiy Alaytsev
Hello!

First of all, I suggest you use Boost imported targets instead of
Boost_INCLUDE_DIRS and Boost_LIBRARY_DIRS and the
target_include_directories() and target_link_libraries() functions. Al this
is to better support exporting CMake package if you need it. If you do not
produce CMake package for use in some other projects, then just ignore this
advice.

Second, just use  pre-built Boost binaries
  . They are just
fine. If your Windows Defender finds something in them then it's the problem
in Windows Defender.

Best regards,
Innokentiy Alaytsev



--
Sent from: http://cmake.3232098.n2.nabble.com/
-- 

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:
https://cmake.org/mailman/listinfo/cmake


[CMake] Boost + CMake + Windows + Sanity -> Possible?

2018-07-12 Thread Wheeler, Gavin
Hello! First the short version...

Can anyone give me a set of instructions to download, build and setup the 
latest Boost (currently 1.67) on Windows 10 for VS 2017 64bit such that the 
following will work...

find_package(Boost REQUIRED COMPONENTS system filesystem thread date_time 
iostreams)
include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})

Including...

- Steps to follow when building and installing Boost
- What environment variables to set and what to set them to, e.g. boost, boost 
library, boost include directories
- What to set in the CMake file so that Boost will be correctly included

I ask about building Boost as well as CMake because it seems to me that unless 
Boost is built in a way that matches CMake expectations it just won't work.

Some background...

I've inherited a project with the above in, along with depndencies on ITK, VTK 
and zlib - all of which I have set up in CMake OK. However, Boost appears to be 
immune to working with CMake. There are various suggestions on the web, but 
nothing consistent, and nothing I've found whcih will work.

I've spent 2 days building Boost (this isn't solely due to CMake, the Boost 
build instructions are all over the place and their latest installer contains a 
trojan according to Windows defender) and configuring CMake in various ways, 
getting frustrated setting various environmental variables, and the nebulous 
target that is a Boost source install.

I can fix this by manually setting all of the library paths and doing some 
fixing up in the resultant project files, but I shouldn't really have to.

Surely it shouldn't be this difficult! Hopefully if there is a clear set of 
instructions from start to finish it will save others future anguish.

For building Boost I ended up using b2 and the following steps install (based 
on https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html) and 
having tried following the instructions to the letter I ended up with...

- Download Boost, e.g. from 
https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.7z
- Extract to e.g. C:\thirdparty\boost\boost_1_67_0
- Build the bootstrapper, as per section 5.2.1 in 
https://www.boost.org/doc/libs/1_67_0/more/getting_started/windows.html
- Build the binaries, simlar to section 5.2.2 in the above, but using
- b2 --build-dir=C:\thirdparty\boost-install\boost_1_67_0 toolset=msvc 
--build-type=complete install
- Why the change?
- Building the Boost build tools didn't seem to affect the building of the 
install
- The inital install command in their instructions didn't seem to actually 
install the headers and libs
- Using stage only seems to collect the lib files together, not the headers
- So I end up with a libs folder and an include folder

I then try to set the following environment variables (as system ones, rather 
than as user ones)

- BOOST_ROOT - to the boost folder of the downloaded and extracted boost
- BOOST_INCLUDEDIR - to the include folder of the installed boost
- BOOST_LIBRARYDIR - the the lib folder of the installed boost

As well as lots of other directories which seemed like they might work.

Then in the CMake (based upon suggestions from the web) I've tried things 
like...

set(Boost_USE_STATIC_LIBSON)
set(Boost_USE_MULTITHREADED  ON)
set(Boost_USE_STATIC_RUNTIMEOFF)

...and...

SET(Boost_ADDITIONAL_VERSIONS "1.67" "1.67.0")

...and...

set (Boost_DETAILED_FAILURE_MSG ON)
set (BOOST_DEBUG ON)

... to no avail






-- 

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:
https://cmake.org/mailman/listinfo/cmake


Re: [CMake] Boost is planning to switch from bjam to CMake!

2017-07-24 Thread Michael Jackson
Let's hope this try actually works. It was tried 8 years ago but some of 
the boost developers really fought the transition. Hopefully with the 
support of the steering committee it will work. Let's all welcome the 
boost devs into the CMake community with wide open arms.

--
Mike Jackson  [mike.jack...@bluequartz.net]


Bo Zhou wrote:

Good news !

Hopefully the bcp would also work with CMake so only requires component
would be installed.


--

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


Re: [CMake] Boost is planning to switch from bjam to CMake!

2017-07-23 Thread Bo Zhou
Good news !

Hopefully the bcp would also work with CMake so only requires component
would be installed.
-- 

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

[CMake] Boost is planning to switch from bjam to CMake!

2017-07-23 Thread Robert Dailey
Very exciting news... hopefully it works out! Congratulations to CMake
for this; this is huge support for CMake and shows it is becoming way
more popular (not that it wasn't already!)

https://lists.boost.org/boost-interest/2017/07/0162.php?utm_content=buffera6a82&utm_medium=social&utm_source=plus.google.com&utm_campaign=buffer
-- 

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


Re: [CMake] Boost moves to CMake

2017-07-18 Thread Konstantin Podsvirov
Hello all! 18.07.2017, 20:48, "Gonzalo Garramuño" :> Just posted in the boost mailing list. Congratulations to both teams!> It seems that we are talking about this thread: https://lists.boost.org/Archives/boost/2017/07/237248.php > --> Gonzalo Garramuño>> -->> 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 Regards,Konstantin Podsvirov -- 

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

[CMake] Boost moves to CMake

2017-07-18 Thread Gonzalo Garramuño

Just posted in the boost mailing list.  Congratulations to both teams!

--
Gonzalo Garramuño

--

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


[CMake] Boost 2 & CMake news

2016-08-03 Thread Nagy-Egri Máté Ferenc via CMake
Does anyone know of the happening around Boost 2 and its possible adoption of 
CMake? I know Boost and CMake have a very long and very sad history, but I 
recall someone reporting on this list that he/she will attend a Boost 2 related 
conference and will again promote the benefits of CMake as opposed to the 
 Boost Build. What is the status of 
the initiative?
-- 

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

Re: [CMake] Boost directories are not added to solution file

2016-06-10 Thread Petr Kmoch
Hi David.

Probably something in your CMakeList is set up incorrectly. If you share
that CMakeList, someone might be able to tell what.

Petr

On 10 June 2016 at 13:09, Xi Shen  wrote:

> I created a simple command line tool on Windows, using the Boost library.
> I use the CMake tool to generate the build file for MSBuild.
>
> I set the BOOST_INCLUDEDIR environment variable and CMake generated the
> build file without any error.
>
> However the solution cannot be built by MSBuild. It complains not able to
> find "boost\regex.hpp" file, etc.
>
> I found if I open the solution file and edit the `additional include
> directory` and `additional library directory`, the solution can build
> without error.
>
> So I wonder why CMake did not add those directories to the solution. What
> did I miss?
>
>
> Thanks,
> Daivd
>
> --
>
> Thanks,
> David S.
>
> --
>
> 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
>
-- 

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

[CMake] Boost directories are not added to solution file

2016-06-10 Thread Xi Shen
I created a simple command line tool on Windows, using the Boost library. I
use the CMake tool to generate the build file for MSBuild.

I set the BOOST_INCLUDEDIR environment variable and CMake generated the
build file without any error.

However the solution cannot be built by MSBuild. It complains not able to
find "boost\regex.hpp" file, etc.

I found if I open the solution file and edit the `additional include
directory` and `additional library directory`, the solution can build
without error.

So I wonder why CMake did not add those directories to the solution. What
did I miss?


Thanks,
Daivd

-- 

Thanks,
David S.
-- 

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

Re: [CMake] Boost library directory not found unless I explicitly set BOOST_LIBRARYDIR ?

2014-11-14 Thread David Cole via CMake
You will find a list of CMake "Module Maintainers" here:
http://www.cmake.org/Wiki/CMake:Module_Maintainers

If a module is not listed, it is not currently claimed. (Meaning
either nobody is currently maintaining it, or "everybody" is pitching
in a little bit as things important to them arise.)

Unfortunately, FindBoost is among the maintainer-less modules at present...

However, ... patches are welcome. :-)


HTH,
David C.


On Fri, Nov 14, 2014 at 2:09 PM, Glenn Coombs  wrote:
> Ryan,
>
> Thanks for the helper script - I'll try that out on Monday.
>
> Does anybody know if the FindBoost.cmake file is maintained by the CMake
> developers, or does it have a 3rd party maintainer ?  It would be nice to
> see some logic similar to your script incorporated by default so that other
> people experience the simplicity of it just working straight out of the box.
>
> --
> Glenn
>
> On 14 November 2014 16:23, Ryan Pavlik  wrote:
>>
>> I've used a script to help it out a bit. I think these Windows installers
>> are new.  Here's the script I use - it basically sets BOOST_ROOT and
>> BOOST_LIBRARYDIR automatically in some cases.
>> https://gist.github.com/rpavlik/586f1fda6e32777623e1
>>
>> Ryan
>>
>> On Fri, Nov 14, 2014 at 6:56 AM, Glenn Coombs 
>> wrote:
>>>
>>> Hi,
>>>
>>> I have installed Boost on Windows 7 for Visual Studio 2013 by running
>>> these installers:
>>>
>>> boost_1_56_0-msvc-12.0-32.exe
>>> boost_1_56_0-msvc-12.0-64.exe
>>>
>>> downloaded from
>>> http://sourceforge.net/projects/boost/files/boost-binaries/1.56.0/.
>>>
>>> I'm using CMake 2.8.12.1 and when I try to build a simple Boost example
>>> using the filesystem library my cmake configuration step fails to find the
>>> required libraries unless I use the BOOST_LIBRARYDIR variable to tell it
>>> where the libraries are:
>>>
>>> set(BOOST_VERSION_NEEDED 1.53.0)
>>>
>>> if (MSVC)
>>> set(Boost_USE_STATIC_LIBS   ON)
>>> set(Boost_USE_MULTITHREADED ON)
>>> set(Boost_USE_STATIC_RUNTIMEON)
>>> #   set(BOOST_LIBRARYDIR/Boost/boost_1_56_0/lib64-msvc-12.0)
>>> endif()
>>>
>>> find_package(Boost ${BOOST_VERSION_NEEDED} REQUIRED COMPONENTS system
>>> filesystem)
>>>
>>> Given that the library directory is where the official Boost installer
>>> put it shouldn't the FindBoost.cmake package be checking that directory by
>>> default ?
>>>
>>> This is the output from CMake:
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS =
>>> 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED =
>>> ON
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = ON
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME =
>>> ON
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS
>>> =
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Declared as CMake or
>>> Environmental Variables:
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:540 ] BOOST_ROOT =
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS =
>>> 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:639 ] location of version.hpp:
>>> C:/Boost/boost_1_56_0/boost/version.hpp
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] version.hpp reveals boost
>>> 1.56.0
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER =
>>> -vc120
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG =
>>> -s
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG =
>>> -sgd
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:842 ] _boost_LIBRARY_SEARCH_DIRS
>>> =
>>> C:/Boost/boost_1_56_0/lib;C:/Boost/boost_1_56_0/../lib;C:/Boost/boost_1_56_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
>>>
>>> [ C:/Program Files (x86)/CMake
>>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
>>> SYSTEM_LIBRARY_RELEA

Re: [CMake] Boost library directory not found unless I explicitly set BOOST_LIBRARYDIR ?

2014-11-14 Thread Glenn Coombs
Ryan,

Thanks for the helper script - I'll try that out on Monday.

Does anybody know if the FindBoost.cmake file is maintained by the CMake
developers, or does it have a 3rd party maintainer ?  It would be nice to
see some logic similar to your script incorporated by default so that other
people experience the simplicity of it just working straight out of the box.

--
Glenn

On 14 November 2014 16:23, Ryan Pavlik  wrote:

> I've used a script to help it out a bit. I think these Windows installers
> are new.  Here's the script I use - it basically sets BOOST_ROOT and
> BOOST_LIBRARYDIR automatically in some cases.
> https://gist.github.com/rpavlik/586f1fda6e32777623e1
>
> Ryan
>
> On Fri, Nov 14, 2014 at 6:56 AM, Glenn Coombs 
> wrote:
>
>> Hi,
>>
>> I have installed Boost on Windows 7 for Visual Studio 2013 by running
>> these installers:
>>
>> boost_1_56_0-msvc-12.0-32.exe
>> boost_1_56_0-msvc-12.0-64.exe
>>
>> downloaded from
>> http://sourceforge.net/projects/boost/files/boost-binaries/1.56.0/.
>>
>> I'm using CMake 2.8.12.1 and when I try to build a simple Boost example
>> using the filesystem library my cmake configuration step fails to find the
>> required libraries unless I use the BOOST_LIBRARYDIR variable to tell it
>> where the libraries are:
>>
>> set(BOOST_VERSION_NEEDED 1.53.0)
>>
>> if (MSVC)
>> set(Boost_USE_STATIC_LIBS   ON)
>> set(Boost_USE_MULTITHREADED ON)
>> set(Boost_USE_STATIC_RUNTIMEON)
>> #   set(BOOST_LIBRARYDIR/Boost/boost_1_56_0/lib64-msvc-12.0)
>> endif()
>>
>> find_package(Boost ${BOOST_VERSION_NEEDED} REQUIRED COMPONENTS system
>> filesystem)
>>
>> Given that the library directory is where the official Boost installer
>> put it shouldn't the FindBoost.cmake package be checking that directory by
>> default ?
>>
>> This is the output from CMake:
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS =
>> 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED =
>> ON
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = ON
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME
>> = ON
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS
>> =
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Declared as CMake or
>> Environmental Variables:
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:540 ] BOOST_ROOT =
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS =
>> 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:639 ] location of version.hpp:
>> C:/Boost/boost_1_56_0/boost/version.hpp
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] version.hpp reveals boost
>> 1.56.0
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER =
>> -vc120
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG =
>> -s
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG =
>> -sgd
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:842 ]
>> _boost_LIBRARY_SEARCH_DIRS =
>> C:/Boost/boost_1_56_0/lib;C:/Boost/boost_1_56_0/../lib;C:/Boost/boost_1_56_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
>> SYSTEM_LIBRARY_RELEASE:
>> libboost_system-vc120-mt-s-1_56;libboost_system-vc120-mt-s;libboost_system-mt-s-1_56;libboost_system-mt-s;libboost_system
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for
>> SYSTEM_LIBRARY_DEBUG:
>> libboost_system-vc120-mt-sgd-1_56;libboost_system-vc120-mt-sgd;libboost_system-mt-sgd-1_56;libboost_system-mt-sgd;libboost_system-mt;libboost_system
>>
>> [ C:/Program Files (x86)/CMake
>> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
>> FILESYSTEM_LIBRARY_RELEASE:
>> libboost_filesystem-vc120-mt-s-1_56;libboost_filesystem-vc120-mt-s;libboost

Re: [CMake] Boost library directory not found unless I explicitly set BOOST_LIBRARYDIR ?

2014-11-14 Thread Ryan Pavlik
I've used a script to help it out a bit. I think these Windows installers
are new.  Here's the script I use - it basically sets BOOST_ROOT and
BOOST_LIBRARYDIR automatically in some cases.
https://gist.github.com/rpavlik/586f1fda6e32777623e1

Ryan


On Fri, Nov 14, 2014 at 6:56 AM, Glenn Coombs 
wrote:

> Hi,
>
> I have installed Boost on Windows 7 for Visual Studio 2013 by running
> these installers:
>
> boost_1_56_0-msvc-12.0-32.exe
> boost_1_56_0-msvc-12.0-64.exe
>
> downloaded from
> http://sourceforge.net/projects/boost/files/boost-binaries/1.56.0/.
>
> I'm using CMake 2.8.12.1 and when I try to build a simple Boost example
> using the filesystem library my cmake configuration step fails to find the
> required libraries unless I use the BOOST_LIBRARYDIR variable to tell it
> where the libraries are:
>
> set(BOOST_VERSION_NEEDED 1.53.0)
>
> if (MSVC)
> set(Boost_USE_STATIC_LIBS   ON)
> set(Boost_USE_MULTITHREADED ON)
> set(Boost_USE_STATIC_RUNTIMEON)
> #   set(BOOST_LIBRARYDIR/Boost/boost_1_56_0/lib64-msvc-12.0)
> endif()
>
> find_package(Boost ${BOOST_VERSION_NEEDED} REQUIRED COMPONENTS system
> filesystem)
>
> Given that the library directory is where the official Boost installer put
> it shouldn't the FindBoost.cmake package be checking that directory by
> default ?
>
> This is the output from CMake:
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS =
> 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED =
> ON
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = ON
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME
> = ON
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS
> =
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Declared as CMake or
> Environmental Variables:
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:540 ] BOOST_ROOT =
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS =
> 1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:639 ] location of version.hpp:
> C:/Boost/boost_1_56_0/boost/version.hpp
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] version.hpp reveals boost
> 1.56.0
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER =
> -vc120
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG =
> -s
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG =
> -sgd
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:842 ]
> _boost_LIBRARY_SEARCH_DIRS =
> C:/Boost/boost_1_56_0/lib;C:/Boost/boost_1_56_0/../lib;C:/Boost/boost_1_56_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
> SYSTEM_LIBRARY_RELEASE:
> libboost_system-vc120-mt-s-1_56;libboost_system-vc120-mt-s;libboost_system-mt-s-1_56;libboost_system-mt-s;libboost_system
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for
> SYSTEM_LIBRARY_DEBUG:
> libboost_system-vc120-mt-sgd-1_56;libboost_system-vc120-mt-sgd;libboost_system-mt-sgd-1_56;libboost_system-mt-sgd;libboost_system-mt;libboost_system
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
> FILESYSTEM_LIBRARY_RELEASE:
> libboost_filesystem-vc120-mt-s-1_56;libboost_filesystem-vc120-mt-s;libboost_filesystem-mt-s-1_56;libboost_filesystem-mt-s;libboost_filesystem
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for
> FILESYSTEM_LIBRARY_DEBUG:
> libboost_filesystem-vc120-mt-sgd-1_56;libboost_filesystem-vc120-mt-sgd;libboost_filesystem-mt-sgd-1_56;libboost_filesystem-mt-sgd;libboost_filesystem-mt;libboost_filesystem
>
> [ C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/FindBoost.cmake:1017 ] Boost_FOUND = 1
>
> Could NOT find Boost
>
> Boost version: 1.56.0
>
> Boost include path: C:/Boost

[CMake] Boost library directory not found unless I explicitly set BOOST_LIBRARYDIR ?

2014-11-14 Thread Glenn Coombs
Hi,

I have installed Boost on Windows 7 for Visual Studio 2013 by running these
installers:

boost_1_56_0-msvc-12.0-32.exe
boost_1_56_0-msvc-12.0-64.exe

downloaded from
http://sourceforge.net/projects/boost/files/boost-binaries/1.56.0/.

I'm using CMake 2.8.12.1 and when I try to build a simple Boost example
using the filesystem library my cmake configuration step fails to find the
required libraries unless I use the BOOST_LIBRARYDIR variable to tell it
where the libraries are:

set(BOOST_VERSION_NEEDED 1.53.0)

if (MSVC)
set(Boost_USE_STATIC_LIBS   ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIMEON)
#   set(BOOST_LIBRARYDIR/Boost/boost_1_56_0/lib64-msvc-12.0)
endif()

find_package(Boost ${BOOST_VERSION_NEEDED} REQUIRED COMPONENTS system
filesystem)

Given that the library directory is where the official Boost installer put
it shouldn't the FindBoost.cmake package be checking that directory by
default ?

This is the output from CMake:

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:476 ] _boost_TEST_VERSIONS =
1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:478 ] Boost_USE_MULTITHREADED =
ON

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:480 ] Boost_USE_STATIC_LIBS = ON

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:482 ] Boost_USE_STATIC_RUNTIME
= ON

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:484 ] Boost_ADDITIONAL_VERSIONS
=

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:486 ] Boost_NO_SYSTEM_PATHS =

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:538 ] Declared as CMake or
Environmental Variables:

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:540 ] BOOST_ROOT =

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:542 ] BOOST_INCLUDEDIR =

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:544 ] BOOST_LIBRARYDIR =

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:546 ] _boost_TEST_VERSIONS =
1.56.0;1.56;1.55.0;1.55;1.54.0;1.54;1.53.0;1.53

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:639 ] location of version.hpp:
C:/Boost/boost_1_56_0/boost/version.hpp

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:663 ] version.hpp reveals boost
1.56.0

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:739 ] guessed _boost_COMPILER =
-vc120

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:749 ] _boost_MULTITHREADED = -mt

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:792 ] _boost_RELEASE_ABI_TAG =
-s

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:794 ] _boost_DEBUG_ABI_TAG =
-sgd

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:842 ]
_boost_LIBRARY_SEARCH_DIRS =
C:/Boost/boost_1_56_0/lib;C:/Boost/boost_1_56_0/../lib;C:/Boost/boost_1_56_0/stage/lib;PATHS;C:/boost/lib;C:/boost;/sw/local/lib

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
SYSTEM_LIBRARY_RELEASE:
libboost_system-vc120-mt-s-1_56;libboost_system-vc120-mt-s;libboost_system-mt-s-1_56;libboost_system-mt-s;libboost_system

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for
SYSTEM_LIBRARY_DEBUG:
libboost_system-vc120-mt-sgd-1_56;libboost_system-vc120-mt-sgd;libboost_system-mt-sgd-1_56;libboost_system-mt-sgd;libboost_system-mt;libboost_system

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:930 ] Searching for
FILESYSTEM_LIBRARY_RELEASE:
libboost_filesystem-vc120-mt-s-1_56;libboost_filesystem-vc120-mt-s;libboost_filesystem-mt-s-1_56;libboost_filesystem-mt-s;libboost_filesystem

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:966 ] Searching for
FILESYSTEM_LIBRARY_DEBUG:
libboost_filesystem-vc120-mt-sgd-1_56;libboost_filesystem-vc120-mt-sgd;libboost_filesystem-mt-sgd-1_56;libboost_filesystem-mt-sgd;libboost_filesystem-mt;libboost_filesystem

[ C:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindBoost.cmake:1017 ] Boost_FOUND = 1

Could NOT find Boost

Boost version: 1.56.0

Boost include path: C:/Boost/boost_1_56_0

Could not find the following static Boost libraries:

boost_system

boost_filesystem

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of Boost.


As you can see it is looking for a directory called lib rather than
lib64-msvc-12.0.

--
Glenn
-- 

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 CM

Re: [CMake] [boost][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2013-04-16 Thread Klaim - Joël Lamotte
On Tue, Apr 16, 2013 at 3:16 PM, Andreas Haferburg wrote:

> > I can't guarantee where the boost libraries are installed, that's why I
> use FindBoost.
> Just make the CMake error message clear, e.g. "Boost 1.50 expected to be
> found in ". Most people know how to rename a directory.


That's what I'm doing currently but I find it problematic these kind of
problems with c++ libraries which
are boring to setup when you start to work on a new project (I'm mostly
thinking about other people who wants to work
on my projects).

All I want is to simplify dev for potential participants to my open source
projects.

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2013-04-16 Thread Andreas Haferburg
On 11.10.2012 12:16, Klaim - Joël Lamotte wrote:> 2. find a way for CMake FindBoost to automatically 
find the 64 bit binaries instead of the 32 bit

> binaris.
> I don't see a clear solution to achieve this, because it depends a lot on how boost have been 
compiled.


Use a naming convention, e.g. set BOOST_ROOT to "Boost--", where compiler is 
either vs10 or vs10x64. Assuming that Boost is not your only dependency, a naming convention is way 
easier to implement than fixing all the Find*.cmake scripts.


> I can't guarantee where the boost libraries are installed, that's why I use 
FindBoost.
Just make the CMake error message clear, e.g. "Boost 1.50 expected to be found in ". Most 
people know how to rename a directory.


Regards
Andreas
--

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-users] [boost][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2013-04-16 Thread Klaim - Joël Lamotte
On Tue, Apr 16, 2013 at 12:32 PM, Slava
wrote:

>
> You build 64-bit stuff (including boost if you wish) in 64-bit
> environment, 32-bit stuff (including boost if you wish) in a separate
> 32-bit environment. The environment is native for build tools, so you need
> no crosscompiling (-m32), no special library lookups. Google for 'linux
> 32-bit chroot' for more information.


But then you need two compilation environment which not everyone can get
(or be authorized to use in some companies).
My point is that there shouldn't be a need for this: you can already
compile for 64 or 32 bit with your compiler, only boost lacks a way to find
the right binaries.
I myself can't use another environment at the moment. And I don't want to,
I need to work with a single laptop from everywhere and don't have space
and patience for dual boot.

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-users] [boost][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2013-04-16 Thread Klaim - Joël Lamotte
On Tue, Apr 16, 2013 at 9:15 AM, Slava wrote:

>
> In my experience finding/adapting packages for crosscompiling 64->32 is
> much more troublesome than setting up 32-bit chroot and using it for 32-bit
> builds.


Sorry but I don't understand, certainly because I'm still a noob at linux
stuffs.
I don't understand what you mean by crosscompiling here, do you mean cross
compiling boost? The problem being how CMake will find the right binaries,
I don't see how it solve the problem?

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2013-04-16 Thread Slava
On Mon, 15 Apr 2013 16:59:25 +0200, Klaim - Joël Lamotte  
 wrote:




For now I think the simplest solution would be to make b2 use a default
64bit lib directory
when the directory is unspecify. Then FindBoost cmake module can rely on
this knowledge to try to find the right binaries,
based on BOOST_Dir, instead of always using the same binaries by default.

Does it seem like a good solution to you?



In my experience finding/adapting packages for crosscompiling 64->32 is  
much more troublesome than setting up 32-bit chroot and using it for  
32-bit builds.


-- Slava

--

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2013-04-15 Thread Klaim - Joël Lamotte
On Thu, Oct 11, 2012 at 2:19 PM, Klaim - Joël Lamotte wrote:

> My current understanding is that boost don't have a specific default lib
> dir for different address models, which is the source of the problem as
> FindBoost script can't rely on a protocol to find these lib files.
>
> Am I correct?
>


I am getting back to this because it is becoming more a problem each day
for me:
I have several projects that would benefit from a 64bit version, but still
need to be provided as a 32bit version too.

Apparently setting BOOST_LIBRARYDIR does indeed allow to manually specify
the library directory.
I reported the issue ( http://www.cmake.org/Bug/view.php?id=14087 )that
this is not documented in the help command
or maybe it's because BOOST_LIBRARY_DIRS should be used instead but it
don't work because BOOST_LIBRARY_DIRS
is automatically overriden.

In my specific case, as I need to build either the 32 bit or the 64bit
version of the applications,
I need to specify BOOST_LIBRARYDIR in both cases to be sure the user (other
developers starting helping on the project)
is linking with the correct version instead of relying on BOOST_DIR.
This is not perfect but at least the developer can't ignore the issue.

I am looking for suggestions to improve the situation, either on CMake or
boost,
as I'm not sure what to do exactly. I'm willing to subit patches to both to
ease
development of 32+64bits application using CMake and boost, so
some directions on how to this issue would be useful.

For now I think the simplest solution would be to make b2 use a default
64bit lib directory
when the directory is unspecify. Then FindBoost cmake module can rely on
this knowledge to try to find the right binaries,
based on BOOST_Dir, instead of always using the same binaries by default.

Does it seem like a good solution to you?

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2012-10-11 Thread Klaim - Joël Lamotte
Júlio Hoffimann said:
>
> I don't know if i understood correctly, but you can set the library
> directory by hand, please refer to
> /usr/share/cmake-/Modules/FindBoost.cmake, in particular the
> variable BOOST_LIBRARYDIR.



On Thu, Oct 11, 2012 at 1:29 PM, Miller, Frank  wrote:

>  A simple solution would be to install only the 64bit version of boost
> into a new directory and change the environment variable to point there.
> Then FindBoost will only be able to see the version you want.
>


Thanks, this will solve my immediate problem, but it don't solve it in
general. (I will use it though, so thanks)
I can't guarantee where the boost libraries are installed, that's why I use
FindBoost.
My current understanding is that boost don't have a specific default lib
dir for different address models, which is the source of the problem as
FindBoost script can't rely on a protocol to find these lib files.

Am I correct?

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2012-10-11 Thread Klaim - Joël Lamotte
Júlio Hoffimann said:
>
> I don't know if i understood correctly, but you can set the library
> directory by hand, please refer to
> /usr/share/cmake-/Modules/FindBoost.cmake, in particular the
> variable BOOST_LIBRARYDIR.



On Thu, Oct 11, 2012 at 1:29 PM, Miller, Frank  wrote:

>  A simple solution would be to install only the 64bit version of boost
> into a new directory and change the environment variable to point there.
> Then FindBoost will only be able to see the version you want.
>


Thanks, this will solve my immediate problem, but it don't solve it in
general. (I will use it though, so thanks)
I can't guarantee where the boost libraries are installed for other
developers of my project, that's why I use FindBoost.
My current understanding is that boost don't have a specific default lib
dir for different address models, which is the source of the problem as
FindBoost script can't rely on a protocol to find these lib files.

Am I correct?

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2012-10-11 Thread Miller, Frank
A simple solution would be to install only the 64bit version of boost into a 
new directory and change the environment variable to point there. Then 
FindBoost will only be able to see the version you want.

Frank


From: cmake-boun...@cmake.org [cmake-boun...@cmake.org] on behalf of Klaim - 
Joël Lamotte [mjkl...@gmail.com]
Sent: Thursday, October 11, 2012 5:16 AM
To: Boost users list; cmake@cmake.org
Subject: [CMake] [boost][b2] Differenciate 32bit and 64 bit binaries when using 
CMake.

I am having a problem with b2 on Windows using Visual Studio (2010 & 2012 but 
it is irrelevant):
Until now I was building boost with b2 in a way that would first build 32 bit 
version in the default library directory, then the 64bit version in lib/64 .
I wasn't using the 64bit version until this morning so I didn't get any problem 
whatever my use of boost was.
I often use Cmake these days and I set the boost environment variables for 
FindBoost CMake script to find it.

My problem is that I'm trying now to use the 64 bit version now and CMake 
FindBoost script will only find the 32 bit version.
CMake correctly assume that the library files in the lib directory are the one 
to use, however it have no apparent way to
find if it is for 64 or 32 bit.

Now I'm not sure how to fix this.
I see two solutions but I don't see how to apply them:

1. make b2 generate lib and dll files with an additional indication on if it's 
64 or 32 bit address model.
I didn't find such option in b2 --help so I assume that it is not possible?

2. find a way for CMake FindBoost to automatically find the 64 bit binaries 
instead of the 32 bit binaris.
I don't see a clear solution to achieve this, because it depends a lot on how 
boost have been compiled.

Note: I don't want to use a default boost installation, I want to use my custom 
build.


Any advice on how I should proceed?

Thanks for your patience.

Joel Lamotte

This communication, including any attachments, may contain information that is 
proprietary, privileged, confidential or legally exempt from disclosure. If you 
are not a named addressee, you are hereby notified that you are not authorized 
to read, print, retain a copy of or disseminate any portion of this 
communication without the consent of the sender and that doing so may be 
unlawful. If you have received this communication in error, please immediately 
notify the sender via return e-mail and delete it from your system.
--

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][b2] Differenciate 32bit and 64 bit binaries when using CMake.

2012-10-11 Thread Klaim - Joël Lamotte
I am having a problem with b2 on Windows using Visual Studio (2010 & 2012
but it is irrelevant):
Until now I was building boost with b2 in a way that would first build 32
bit version in the default library directory, then the 64bit version in
lib/64 .
I wasn't using the 64bit version until this morning so I didn't get any
problem whatever my use of boost was.
I often use Cmake these days and I set the boost environment variables for
FindBoost CMake script to find it.

My problem is that I'm trying now to use the 64 bit version now and CMake
FindBoost script will only find the 32 bit version.
CMake correctly assume that the library files in the lib directory are the
one to use, however it have no apparent way to
find if it is for 64 or 32 bit.

Now I'm not sure how to fix this.
I see two solutions but I don't see how to apply them:

1. make b2 generate lib and dll files with an additional indication on if
it's 64 or 32 bit address model.
I didn't find such option in b2 --help so I assume that it is not possible?

2. find a way for CMake FindBoost to automatically find the 64 bit binaries
instead of the 32 bit binaris.
I don't see a clear solution to achieve this, because it depends a lot on
how boost have been compiled.

Note: I don't want to use a default boost installation, I want to use my
custom build.


Any advice on how I should proceed?

Thanks for your patience.

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

2012-08-08 Thread Sumit Adhikari
Problem fixed. Thanks :)

On Wed, Aug 8, 2012 at 3:35 PM, Nick Overdijk  wrote:

> No, as far as I know you need to specify the components for boost always.
> I know of some find_boost that just put everything in there when you didn't
> name components, but as a rule, just specifiy the components. ;-)
>
> On Wed, Aug 8, 2012 at 1:29 PM, Sumit Adhikari 
> wrote:
>
>> Thanks for the reply. But is this is a Bug ?
>>
>>
>> Regards,
>> Sumit
>>
>>
>> On Wed, Aug 8, 2012 at 1:28 PM, Nick Overdijk  wrote:
>>
>>> Try again with this example:
>>>
>>>
>>> http://stackoverflow.com/questions/3897839/how-to-link-c-program-with-boost-using-cmake
>>>
>>>
>>> On 2012-08-08, at 12:52:06 , Sumit Adhikari wrote:
>>>
>>> I am searching boost like as follows :
>>>
>>> # Boost Library Search
>>> find_package (Boost)
>>> if (Boost_FOUND)
>>>   include_directories(${Boost_INCLUDE_DIRS})
>>>   link_directories(${Boost_LIBRARY_DIRS})
>>>   set(LIBS ${LIBS} ${Boost_LIBRARIES})
>>> else()
>>>message(FATAL_ERROR "Boost Not Found")
>>> endif (Boost_FOUND)
>>>
>>> I see the boost library has been found but include_directories,
>>> link_directories and LIBS are not updated. Is this because I do not have
>>> boost.pc in my system ?
>>>
>>> Any other way to resolve this ?
>>>
>>> Regards,
>>>
>>> --
>>> Sumit Adhikari,
>>> Institute of Computer Technology,
>>> Faculty of Electrical Engineering,
>>> Vienna University of Technology,
>>> Gußhausstraße 27-29,1040 Vienna
>>>  --
>>>
>>> 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
>>>
>>>
>>>
>>
>>
>> --
>> Sumit Adhikari,
>> Institute of Computer Technology,
>> Faculty of Electrical Engineering,
>> Vienna University of Technology,
>> Gußhausstraße 27-29,1040 Vienna
>>
>
>


-- 
Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna
--

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

2012-08-08 Thread Nick Overdijk
No, as far as I know you need to specify the components for boost always. I
know of some find_boost that just put everything in there when you didn't
name components, but as a rule, just specifiy the components. ;-)

On Wed, Aug 8, 2012 at 1:29 PM, Sumit Adhikari wrote:

> Thanks for the reply. But is this is a Bug ?
>
>
> Regards,
> Sumit
>
>
> On Wed, Aug 8, 2012 at 1:28 PM, Nick Overdijk  wrote:
>
>> Try again with this example:
>>
>>
>> http://stackoverflow.com/questions/3897839/how-to-link-c-program-with-boost-using-cmake
>>
>>
>> On 2012-08-08, at 12:52:06 , Sumit Adhikari wrote:
>>
>> I am searching boost like as follows :
>>
>> # Boost Library Search
>> find_package (Boost)
>> if (Boost_FOUND)
>>   include_directories(${Boost_INCLUDE_DIRS})
>>   link_directories(${Boost_LIBRARY_DIRS})
>>   set(LIBS ${LIBS} ${Boost_LIBRARIES})
>> else()
>>message(FATAL_ERROR "Boost Not Found")
>> endif (Boost_FOUND)
>>
>> I see the boost library has been found but include_directories,
>> link_directories and LIBS are not updated. Is this because I do not have
>> boost.pc in my system ?
>>
>> Any other way to resolve this ?
>>
>> Regards,
>>
>> --
>> Sumit Adhikari,
>> Institute of Computer Technology,
>> Faculty of Electrical Engineering,
>> Vienna University of Technology,
>> Gußhausstraße 27-29,1040 Vienna
>>  --
>>
>> 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
>>
>>
>>
>
>
> --
> Sumit Adhikari,
> Institute of Computer Technology,
> Faculty of Electrical Engineering,
> Vienna University of Technology,
> Gußhausstraße 27-29,1040 Vienna
>
--

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

2012-08-08 Thread Sumit Adhikari
Thanks for the reply. But is this is a Bug ?


Regards,
Sumit

On Wed, Aug 8, 2012 at 1:28 PM, Nick Overdijk  wrote:

> Try again with this example:
>
>
> http://stackoverflow.com/questions/3897839/how-to-link-c-program-with-boost-using-cmake
>
>
> On 2012-08-08, at 12:52:06 , Sumit Adhikari wrote:
>
> I am searching boost like as follows :
>
> # Boost Library Search
> find_package (Boost)
> if (Boost_FOUND)
>   include_directories(${Boost_INCLUDE_DIRS})
>   link_directories(${Boost_LIBRARY_DIRS})
>   set(LIBS ${LIBS} ${Boost_LIBRARIES})
> else()
>message(FATAL_ERROR "Boost Not Found")
> endif (Boost_FOUND)
>
> I see the boost library has been found but include_directories,
> link_directories and LIBS are not updated. Is this because I do not have
> boost.pc in my system ?
>
> Any other way to resolve this ?
>
> Regards,
>
> --
> Sumit Adhikari,
> Institute of Computer Technology,
> Faculty of Electrical Engineering,
> Vienna University of Technology,
> Gußhausstraße 27-29,1040 Vienna
>  --
>
> 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
>
>
>


-- 
Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna
--

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

2012-08-08 Thread Nick Overdijk
Try again with this example:

http://stackoverflow.com/questions/3897839/how-to-link-c-program-with-boost-using-cmake


On 2012-08-08, at 12:52:06 , Sumit Adhikari wrote:

> I am searching boost like as follows :
> 
> # Boost Library Search
> find_package (Boost)
> if (Boost_FOUND)
>   include_directories(${Boost_INCLUDE_DIRS})
>   link_directories(${Boost_LIBRARY_DIRS})
>   set(LIBS ${LIBS} ${Boost_LIBRARIES})
> else()
>message(FATAL_ERROR "Boost Not Found")
> endif (Boost_FOUND)
> 
> I see the boost library has been found but include_directories, 
> link_directories and LIBS are not updated. Is this because I do not have 
> boost.pc in my system ?
> 
> Any other way to resolve this ?
> 
> Regards,
> 
> -- 
> Sumit Adhikari,
> Institute of Computer Technology,
> Faculty of Electrical Engineering,
> Vienna University of Technology,
> Gußhausstraße 27-29,1040 Vienna
> --
> 
> 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

[CMake] Boost

2012-08-08 Thread Sumit Adhikari
I am searching boost like as follows :

# Boost Library Search
find_package (Boost)
if (Boost_FOUND)
  include_directories(${Boost_INCLUDE_DIRS})
  link_directories(${Boost_LIBRARY_DIRS})
  set(LIBS ${LIBS} ${Boost_LIBRARIES})
else()
   message(FATAL_ERROR "Boost Not Found")
endif (Boost_FOUND)

I see the boost library has been found but include_directories,
link_directories and LIBS are not updated. Is this because I do not have
boost.pc in my system ?

Any other way to resolve this ?

Regards,

-- 
Sumit Adhikari,
Institute of Computer Technology,
Faculty of Electrical Engineering,
Vienna University of Technology,
Gußhausstraße 27-29,1040 Vienna
--

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 build failure

2012-07-22 Thread Steven Venter
Hi

I'm trying to build a project that uses boost::asio for serial comms. I get
the following error when I try to build:

/usr/include/boost/system/error_code.hpp:208: undefined reference to
`boost::system::get_system_category()'

A copy of the CMake file is located here: http://ideone.com/nRxvK

Your help is appreciated.
Steven
--

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-users] link error in Visual Studio when using boost from CMake

2012-05-01 Thread Hui Wang
Yes, target_link_libraries works well, I had problem before because I used
find_package(Boost) instead of find_package(Boost COMPONENTS thread), so
when I used target_link_libraries( MyProject ${Boost_LIBRARIES} ), it
didn't link anything, after I specify the components in find_package, it
has no problem.

On Tue, May 1, 2012 at 11:47 AM, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

>
> On May 1, 2012, at 11:37 AM, Mourad Boufarguine wrote:
>
> >
> > On Tue, May 1, 2012 at 9:10 AM, Rolf Eike Beer  wrote:
> > On Di.,   1. Mai. 2012 00:20:58 CEST, Mourad Boufarguine <
> mou...@boufarguine.name> wrote:
> >
> > > Hi,
> > >
> > > add this :
> > >
> > > link_directories(${Boost_LIBRARY_DIRS})
> > >
> > > after the include_directories command.
> >
> > No, please don't. The target_link_libraries command is what you really
> want. Please stop advertising link_directories, it's usage is almost
> certainly wrong and while it sometimes seems to solve your problem it
> usually just creates another one.
> >
> > Eike
> > --
> >
> >
> >
> > Unless you disable Boost auto-linking, i'm afraid it's the only option.
> Boost autolinking is enabled by default for Visual Studio. In this case,
> Boost headers have pragmas to link to Boost libs.
> >
> > #pragma comment (lib, "libboost_.lib")
> >
> > If you don't add  Boost_LIBRARY_DIRS  to the link directories, it won't
> work.
> >
> > Mourad
> >
>
> Nope. I don't use link_directories at all and I use Boost on windows all
> the time. I use the "target_link_libraries(...) method and it has NEVER
> give me any trouble on windows with VS 2005, 2008 and 2010.
>
> YMMV (but it shouldn't)
> ---
> Mike Jackson www.bluequartz.net
>
> --
>
> 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
>



-- 
Sophie Wang
www.sophiehuiwang.com
--

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-users] link error in Visual Studio when using boost from CMake

2012-05-01 Thread Michael Jackson

On May 1, 2012, at 11:37 AM, Mourad Boufarguine wrote:

> 
> On Tue, May 1, 2012 at 9:10 AM, Rolf Eike Beer  wrote:
> On Di.,   1. Mai. 2012 00:20:58 CEST, Mourad Boufarguine 
>  wrote:
> 
> > Hi,
> >
> > add this :
> >
> > link_directories(${Boost_LIBRARY_DIRS})
> >
> > after the include_directories command.
> 
> No, please don't. The target_link_libraries command is what you really want. 
> Please stop advertising link_directories, it's usage is almost certainly 
> wrong and while it sometimes seems to solve your problem it usually just 
> creates another one.
> 
> Eike
> --
> 
> 
> 
> Unless you disable Boost auto-linking, i'm afraid it's the only option. Boost 
> autolinking is enabled by default for Visual Studio. In this case, Boost 
> headers have pragmas to link to Boost libs.
> 
> #pragma comment (lib, "libboost_.lib")
> 
> If you don't add  Boost_LIBRARY_DIRS  to the link directories, it won't work.
> 
> Mourad
> 

Nope. I don't use link_directories at all and I use Boost on windows all the 
time. I use the "target_link_libraries(...) method and it has NEVER give me any 
trouble on windows with VS 2005, 2008 and 2010.

YMMV (but it shouldn't)
---
Mike Jackson www.bluequartz.net

--

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-users] link error in Visual Studio when using boost from CMake

2012-05-01 Thread Mourad Boufarguine
On Tue, May 1, 2012 at 9:10 AM, Rolf Eike Beer  wrote:

> On Di.,   1. Mai. 2012 00:20:58 CEST, Mourad Boufarguine <
> mou...@boufarguine.name> wrote:
>
> > Hi,
> >
> > add this :
> >
> > link_directories(${Boost_LIBRARY_DIRS})
> >
> > after the include_directories command.
>
> No, please don't. The target_link_libraries command is what you really
> want. Please stop advertising link_directories, it's usage is almost
> certainly wrong and while it sometimes seems to solve your problem it
> usually just creates another one.
>
> Eike
> --
>
>
>
Unless you disable Boost auto-linking, i'm afraid it's the only option.
Boost autolinking is enabled by default for Visual Studio. In this case,
Boost headers have pragmas to link to Boost libs.

#pragma comment (lib, "libboost_.lib")

If you don't add  Boost_LIBRARY_DIRS  to the link directories, it won't
work.

Mourad
--

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-users] link error in Visual Studio when using boost from CMake

2012-05-01 Thread Rolf Eike Beer
On Di.,   1. Mai. 2012 00:20:58 CEST, Mourad Boufarguine 
 wrote:

> Hi,
> 
> add this :
> 
> link_directories(${Boost_LIBRARY_DIRS})
> 
> after the include_directories command.

No, please don't. The target_link_libraries command is what you really want. 
Please stop advertising link_directories, it's usage is almost certainly wrong 
and while it sometimes seems to solve your problem it usually just creates 
another one.

Eike 
--

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-users] link error in Visual Studio when using boost from CMake

2012-04-30 Thread Mourad Boufarguine
Hi,

add this :

link_directories(${Boost_LIBRARY_DIRS})

after the include_directories command.

Cheers,
Mourad
*
*


On Mon, Apr 30, 2012 at 10:26 PM, Hui Wang  wrote:

> Yes, I tried with find_package( Boost COMPONENTS thread ) and
> target_link_libraries( ShowEngine ${Boost_LIBRARIES}), and that works.
> Thank you so much!
>
> On Mon, Apr 30, 2012 at 3:27 PM, Alain Leblanc  wrote:
>
>> Don't have much experience with boost in combination with cmake, but
>> don't you still need to add the boost libraries in a
>> target_link_libraries() command? (Or whatever command is usedbto indicate
>> the libraries to link with).
>>
>> A
>>  On Apr 30, 2012 2:49 PM, "Hui Wang"  wrote:
>>
>>> Hello,
>>>
>>> I'm using CMake generated Visual Studio solution, and I added boost with
>>> find_package(Boost),
>>> before that I used commands: set(Boost_USE_STATIC_LIBS
>>> ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF)
>>> after that I used
>>> commands: include_directories(${Boost_INCLUDE_DIR}) add_executable(
>>> MyProject src/main.cpp)
>>>
>>> Because automatic linking is used on Visual Studio when including Boost,
>>> and it typically use static libraries, I try not to conflict with that. But
>>> I get the error:
>>> LINK : fatal error LNK1104: cannot open file
>>> 'libboost_thread-vc100-mt-gd-1_47.lib'
>>>
>>> I installed pre-compiled binary Boost with the installer provided by
>>> BoostPro Computing, and I checked to find that I do have
>>> libboost_thread-vc100-mt-gd-1_47.lib, libboost_thread-vc100-mt-s-1_47.lib
>>> libboost_thread-vc100-mt-sgd-1_47.lib libboost_thread-vc100-mt-1_47.lib
>>> in C:\Program Files\boost\boost_1_47\lib
>>>
>>> I also output messages to find that
>>> Boost_FOUND=TRUE Boost_LIBRARY_DIRS=C:/Program
>>> Files/boost/boost_1_47/lib Boost_INCLUDE_DIRS=C:/Program
>>> Files/boost/boost_1_47
>>>
>>> So I'm confused why it has the link error. I tried with dynamically
>>> linking too, it can't find the .dll files at runtime either, but again they
>>> exist right there in the directory I installed boost. Could anyone help me
>>> understand where the problem is?
>>>
>>> Thanks!
>>> --
>>> Sophie Wang
>>> www.sophiehuiwang.com
>>>
>>>
>>> --
>>>
>>> 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
>>>
>>
>> ___
>> Boost-users mailing list
>> boost-us...@lists.boost.org
>> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>>
>
>
>
> --
> Sophie Wang
> www.sophiehuiwang.com
>
>
> --
>
> 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] [Boost-users] link error in Visual Studio when using boost from CMake

2012-04-30 Thread Hui Wang
Yes, I tried with find_package( Boost COMPONENTS thread ) and
target_link_libraries( ShowEngine ${Boost_LIBRARIES}), and that works.
Thank you so much!

On Mon, Apr 30, 2012 at 3:27 PM, Alain Leblanc  wrote:

> Don't have much experience with boost in combination with cmake, but don't
> you still need to add the boost libraries in a target_link_libraries()
> command? (Or whatever command is usedbto indicate the libraries to link
> with).
>
> A
>  On Apr 30, 2012 2:49 PM, "Hui Wang"  wrote:
>
>> Hello,
>>
>> I'm using CMake generated Visual Studio solution, and I added boost with
>> find_package(Boost),
>> before that I used commands: set(Boost_USE_STATIC_LIBS
>> ON) set(Boost_USE_MULTITHREADED ON) set(Boost_USE_STATIC_RUNTIME OFF)
>> after that I used
>> commands: include_directories(${Boost_INCLUDE_DIR}) add_executable(
>> MyProject src/main.cpp)
>>
>> Because automatic linking is used on Visual Studio when including Boost,
>> and it typically use static libraries, I try not to conflict with that. But
>> I get the error:
>> LINK : fatal error LNK1104: cannot open file
>> 'libboost_thread-vc100-mt-gd-1_47.lib'
>>
>> I installed pre-compiled binary Boost with the installer provided by
>> BoostPro Computing, and I checked to find that I do have
>> libboost_thread-vc100-mt-gd-1_47.lib, libboost_thread-vc100-mt-s-1_47.lib
>> libboost_thread-vc100-mt-sgd-1_47.lib libboost_thread-vc100-mt-1_47.lib
>> in C:\Program Files\boost\boost_1_47\lib
>>
>> I also output messages to find that
>> Boost_FOUND=TRUE Boost_LIBRARY_DIRS=C:/Program
>> Files/boost/boost_1_47/lib Boost_INCLUDE_DIRS=C:/Program
>> Files/boost/boost_1_47
>>
>> So I'm confused why it has the link error. I tried with dynamically
>> linking too, it can't find the .dll files at runtime either, but again they
>> exist right there in the directory I installed boost. Could anyone help me
>> understand where the problem is?
>>
>> Thanks!
>> --
>> Sophie Wang
>> www.sophiehuiwang.com
>>
>>
>> --
>>
>> 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
>>
>
> ___
> Boost-users mailing list
> boost-us...@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



-- 
Sophie Wang
www.sophiehuiwang.com
--

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] cmake, boost on windows, and linking: shouldn't find_package have put BOOST_ROOT/lib into LIB?

2011-10-30 Thread Dan Kegel
Thanks to David & Daniel for the replies, but I was
already doing everything by the book, so their replies
didn't help.  It seems to be a bug, or flaky feature, in boost; I had
to disable "auto-linking".  Here's the final, working CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
# Turn off boost's autolinking feature, since it seems to guess wrong
about the name of the library
add_definitions(-DBOOST_ALL_NO_LIB)
find_package(Boost 1.45 COMPONENTS date_time REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINITIONS})
add_executable(mymain mymain.cpp)
target_link_libraries(mymain ${Boost_LIBRARIES})

The only change from before was adding the add_definitions line.
--

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] cmake, boost on windows, and linking: shouldn't find_package have put BOOST_ROOT/lib into LIB?

2011-10-30 Thread David Cole
On Sun, Oct 30, 2011 at 5:46 AM, Daniel Dekkers  wrote:
> find_package() searches for a package, and sets variables. Typically 
> variables like...
>
> _FOUND # package found or not
> _INCLUDE_DIR # path to the libraries include directory
> _LIBRARY # name of the library
>
> You still have to link in the library yourself:
>
> target_link_libraries(${TARGET} ${_LIBRARY})
>
> For Boost, you can specify which libraries you are actually going to use:
>
> set(BOOST_ROOT path/to/Boost) # boost root dir
> find_package(Boost 1.47.0 COMPONENTS regex REQUIRED) # find the regex lib
>
> ...
>
> include_directories(${Boost_INCLUDE_DIR}) # if you use Boost header only, 
> this is all you need
>
> …
>
> target_link_libraries(${TARGET} ${Boost_REGEX_LIBRARY}) # link in the regex 
> lib from boost.
>
> Daniel
>
> On Oct 29, 2011, at 4:11 AM, Dan Kegel wrote:
>
>> I'm slowly learning cmake and converting some real software to it,
>> targeting Linux, Windows, and Mac OS X.
>> Along the way, I'm making minimal working examples (they're a lot
>> easier to debug them than the real thing) and putting them up at
>> http://code.google.com/p/winezeug/source/browse/#svn/trunk/cmake_examples
>>
>> Today, I wrote an example that uses a single function from boost.  It's at
>>  http://code.google.com/p/winezeug/source/browse/#svn%2Ftrunk%2Fcmake_examples%2Fex4
>>
>> For Linux, demo.sh builds and runs the example, assuming you've
>> installed everything needed with apt-get.
>> For Windows (or Linux with Wine), demo.bat builds and runs the
>> example, assuming you've installed visual c++ 2005 express, the win 7
>> platform sdk, and boostpro.com's pre-build boost (the whole thing,
>> don't skip any libraries, or you may be mystified why things don't
>> link, like I was).    It sets BOOST_ROOT so find_package can find
>> boost.
>>
>> And now the question.
>> I needed to put $BOOST_ROOT/lib into the LIB environment variable by
>> hand (well, by running
>> http://code.google.com/p/winezeug/source/browse/trunk/cmake_examples/settings.bat
>> ).
>> If I leave it out, I get the error
>> LINK : fatal error LNK1104: cannot open file
>> 'libboost_date_time-vc80-mt-gd-1_47.lib'
>> when bulding on Windows.
>> Shouldn't find_package have taken care of that?
>> --
>>
>> 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
>

The typical target_link_libraries call should name the libraries by
full path, and avoid requiring anything with respect to environment
variables.

Environment variable values may be used as hints or pointers about
where to find something, but CMake does not modify your environment or
set up any environment in the generated makefiles.

If a project has requirements about the environment in which it runs,
it is expected that the project's CMakeLists files will
document/enforce such requirements.


HTH,
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] cmake, boost on windows, and linking: shouldn't find_package have put BOOST_ROOT/lib into LIB?

2011-10-30 Thread Daniel Dekkers
find_package() searches for a package, and sets variables. Typically variables 
like...

_FOUND # package found or not
_INCLUDE_DIR # path to the libraries include directory
_LIBRARY # name of the library

You still have to link in the library yourself:

target_link_libraries(${TARGET} ${_LIBRARY})

For Boost, you can specify which libraries you are actually going to use:

set(BOOST_ROOT path/to/Boost) # boost root dir
find_package(Boost 1.47.0 COMPONENTS regex REQUIRED) # find the regex lib

...

include_directories(${Boost_INCLUDE_DIR}) # if you use Boost header only, this 
is all you need

…

target_link_libraries(${TARGET} ${Boost_REGEX_LIBRARY}) # link in the regex lib 
from boost.

Daniel

On Oct 29, 2011, at 4:11 AM, Dan Kegel wrote:

> I'm slowly learning cmake and converting some real software to it,
> targeting Linux, Windows, and Mac OS X.
> Along the way, I'm making minimal working examples (they're a lot
> easier to debug them than the real thing) and putting them up at
> http://code.google.com/p/winezeug/source/browse/#svn/trunk/cmake_examples
> 
> Today, I wrote an example that uses a single function from boost.  It's at
>  
> http://code.google.com/p/winezeug/source/browse/#svn%2Ftrunk%2Fcmake_examples%2Fex4
> 
> For Linux, demo.sh builds and runs the example, assuming you've
> installed everything needed with apt-get.
> For Windows (or Linux with Wine), demo.bat builds and runs the
> example, assuming you've installed visual c++ 2005 express, the win 7
> platform sdk, and boostpro.com's pre-build boost (the whole thing,
> don't skip any libraries, or you may be mystified why things don't
> link, like I was).It sets BOOST_ROOT so find_package can find
> boost.
> 
> And now the question.
> I needed to put $BOOST_ROOT/lib into the LIB environment variable by
> hand (well, by running
> http://code.google.com/p/winezeug/source/browse/trunk/cmake_examples/settings.bat
> ).
> If I leave it out, I get the error
> LINK : fatal error LNK1104: cannot open file
> 'libboost_date_time-vc80-mt-gd-1_47.lib'
> when bulding on Windows.
> Shouldn't find_package have taken care of that?
> --
> 
> 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


[CMake] cmake, boost on windows, and linking: shouldn't find_package have put BOOST_ROOT/lib into LIB?

2011-10-28 Thread Dan Kegel
I'm slowly learning cmake and converting some real software to it,
targeting Linux, Windows, and Mac OS X.
Along the way, I'm making minimal working examples (they're a lot
easier to debug them than the real thing) and putting them up at
http://code.google.com/p/winezeug/source/browse/#svn/trunk/cmake_examples

Today, I wrote an example that uses a single function from boost.  It's at
  
http://code.google.com/p/winezeug/source/browse/#svn%2Ftrunk%2Fcmake_examples%2Fex4

For Linux, demo.sh builds and runs the example, assuming you've
installed everything needed with apt-get.
For Windows (or Linux with Wine), demo.bat builds and runs the
example, assuming you've installed visual c++ 2005 express, the win 7
platform sdk, and boostpro.com's pre-build boost (the whole thing,
don't skip any libraries, or you may be mystified why things don't
link, like I was).It sets BOOST_ROOT so find_package can find
boost.

And now the question.
I needed to put $BOOST_ROOT/lib into the LIB environment variable by
hand (well, by running
http://code.google.com/p/winezeug/source/browse/trunk/cmake_examples/settings.bat
).
If I leave it out, I get the error
LINK : fatal error LNK1104: cannot open file
'libboost_date_time-vc80-mt-gd-1_47.lib'
when bulding on Windows.
Shouldn't find_package have taken care of that?
--

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 external project doesn't build with VS2010 generator

2011-10-26 Thread Ben Medina
I tend to use the online documentation:
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject

But I agree that an example would also be useful. Perhaps the wiki
could have examples of how to use external project with common 3rd
party libs (e.g. boost, Qt).

On Wed, Oct 26, 2011 at 9:00 AM, David Cole  wrote:
> On Wed, Oct 26, 2011 at 11:56 AM, Ben Medina  wrote:
>> David,
>>
>> Yes, adding "call" to the front of the command works. Thanks! Would be
>> great to get that fixed for 2.8.7, as I spent a good portion of
>> yesterday racking my brain about this.
>>
>> I also discovered that, if using a variable to build the
>> CONFIGURE_COMMAND, that variable should be a list, rather than a
>> space-separated string. Would be nice to document that, too.
>
> How / where should that be documented? Where would you have looked for
> that information?
>
> That's how all the *_COMMAND args for ExternalProject are...
>
> I think it would be better expressed through example/sample code that
> uses variables, but I'm not sure where the best place to put the
> documentation is.
>
>
> David
>
>
>>
>> Thanks,
>> Ben
>>
>> On Tue, Oct 25, 2011 at 6:51 PM, David Cole  wrote:
>>> Try changing the configure command to "call bootstrap.bat" instead.
>>> I suspect this is related to the symptoms reported in these bugs:
>>>   http://public.kitware.com/Bug/view.php?id=12445
>>>   http://public.kitware.com/Bug/view.php?id=12461
>>>
>>> Related to using "bat" or "cmd" files as custom commands. We need to get
>>> those fixed for 2.8.7 in the VS 2010 generator.
>>> Let me know if adding "call " to the front of the command works in this
>>> case.
>>>
>>> Thanks,
>>> David
>>>
>>> On Tue, Oct 25, 2011 at 5:30 PM, Ben Medina  wrote:

 Hello all,

 I'm trying to build Boost as an external project, but it won't build
 if I use the VS2010 generator. I've whittled the code down to the
 following CMakeLists.txt:

 cmake_minimum_required(VERSION 2.8)
 project (boost-external)

 set (Boost_Source "E:/boost_1_47_0")

 include(ExternalProject)
 ExternalProject_Add(
    Boost
    SOURCE_DIR "${Boost_Source}"
    UPDATE_COMMAND ""
    BUILD_IN_SOURCE 1
    CONFIGURE_COMMAND bootstrap.bat
    BUILD_COMMAND b2 install
    INSTALL_COMMAND ""
    )

 When I build the project, the configure step happens, but the build
 step is skipped:

 Microsoft (R) Visual Studio Version 10.0.40219.1.
 Copyright (C) Microsoft Corp. All rights reserved.
 2>-- Build started: Project: Boost, Configuration: Debug x64 --
 2>  Performing configure step for 'Boost'
 2>  Building Boost.Build engine
 2>
 2>  Bootstrapping is done. To build, run:
 2>
 2>      .\b2
 2>
 2>  To adjust configuration, edit 'project-config.jam'.
 2>  Further information:
 2>
 2>      - Command line help:
 2>      .\b2 --help
 2>
 2>      - Getting started guide:
 2>      http://boost.org/more/getting_started/windows.html
 2>
 2>      - Boost.Build documentation:
 2>      http://www.boost.org/boost-build2/doc/html/index.html
 3>-- Build started: Project: ALL_BUILD, Configuration: Debug x64
 --
 3>  Build all projects
 == Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped
 ==

 When I use the VS2008 generator, the project builds as expected:

 Microsoft (R) Visual Studio Version 9.0.30729.1.
 Copyright (C) Microsoft Corp. All rights reserved.
 1>-- Build started: Project: Boost, Configuration: Debug x64 --
 1>Creating directories for 'Boost'
 1>No download step for 'Boost'
 1>No patch step for 'Boost'
 1>No update step for 'Boost'
 1>Performing configure step for 'Boost'
 1>Building Boost.Build engine
 ...
 1>Generating Code...
 1>Bootstrapping is done. To build, run:
 1>    .\b2
 1>
 1>To adjust configuration, edit 'project-config.jam'.
 1>Further information:
 1>    - Command line help:
 1>    .\b2 --help
 1>
 1>    - Getting started guide:
 1>    http://boost.org/more/getting_started/windows.html
 1>
 1>    - Boost.Build documentation:
 1>    http://www.boost.org/boost-build2/doc/html/index.html
 1>Performing build step for 'Boost'
 1>has_icu_test.cpp
 1>Performing configuration checks
 ...

 And it goes on to build from there.


 I'm using CMake 2.8.6. Is there some way I can work around this, or
 should I file a bug?

 Thanks,
 Ben
 --

 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/

Re: [CMake] Boost external project doesn't build with VS2010 generator

2011-10-26 Thread David Cole
On Wed, Oct 26, 2011 at 11:56 AM, Ben Medina  wrote:
> David,
>
> Yes, adding "call" to the front of the command works. Thanks! Would be
> great to get that fixed for 2.8.7, as I spent a good portion of
> yesterday racking my brain about this.
>
> I also discovered that, if using a variable to build the
> CONFIGURE_COMMAND, that variable should be a list, rather than a
> space-separated string. Would be nice to document that, too.

How / where should that be documented? Where would you have looked for
that information?

That's how all the *_COMMAND args for ExternalProject are...

I think it would be better expressed through example/sample code that
uses variables, but I'm not sure where the best place to put the
documentation is.


David


>
> Thanks,
> Ben
>
> On Tue, Oct 25, 2011 at 6:51 PM, David Cole  wrote:
>> Try changing the configure command to "call bootstrap.bat" instead.
>> I suspect this is related to the symptoms reported in these bugs:
>>   http://public.kitware.com/Bug/view.php?id=12445
>>   http://public.kitware.com/Bug/view.php?id=12461
>>
>> Related to using "bat" or "cmd" files as custom commands. We need to get
>> those fixed for 2.8.7 in the VS 2010 generator.
>> Let me know if adding "call " to the front of the command works in this
>> case.
>>
>> Thanks,
>> David
>>
>> On Tue, Oct 25, 2011 at 5:30 PM, Ben Medina  wrote:
>>>
>>> Hello all,
>>>
>>> I'm trying to build Boost as an external project, but it won't build
>>> if I use the VS2010 generator. I've whittled the code down to the
>>> following CMakeLists.txt:
>>>
>>> cmake_minimum_required(VERSION 2.8)
>>> project (boost-external)
>>>
>>> set (Boost_Source "E:/boost_1_47_0")
>>>
>>> include(ExternalProject)
>>> ExternalProject_Add(
>>>    Boost
>>>    SOURCE_DIR "${Boost_Source}"
>>>    UPDATE_COMMAND ""
>>>    BUILD_IN_SOURCE 1
>>>    CONFIGURE_COMMAND bootstrap.bat
>>>    BUILD_COMMAND b2 install
>>>    INSTALL_COMMAND ""
>>>    )
>>>
>>> When I build the project, the configure step happens, but the build
>>> step is skipped:
>>>
>>> Microsoft (R) Visual Studio Version 10.0.40219.1.
>>> Copyright (C) Microsoft Corp. All rights reserved.
>>> 2>-- Build started: Project: Boost, Configuration: Debug x64 --
>>> 2>  Performing configure step for 'Boost'
>>> 2>  Building Boost.Build engine
>>> 2>
>>> 2>  Bootstrapping is done. To build, run:
>>> 2>
>>> 2>      .\b2
>>> 2>
>>> 2>  To adjust configuration, edit 'project-config.jam'.
>>> 2>  Further information:
>>> 2>
>>> 2>      - Command line help:
>>> 2>      .\b2 --help
>>> 2>
>>> 2>      - Getting started guide:
>>> 2>      http://boost.org/more/getting_started/windows.html
>>> 2>
>>> 2>      - Boost.Build documentation:
>>> 2>      http://www.boost.org/boost-build2/doc/html/index.html
>>> 3>-- Build started: Project: ALL_BUILD, Configuration: Debug x64
>>> --
>>> 3>  Build all projects
>>> == Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped
>>> ==
>>>
>>> When I use the VS2008 generator, the project builds as expected:
>>>
>>> Microsoft (R) Visual Studio Version 9.0.30729.1.
>>> Copyright (C) Microsoft Corp. All rights reserved.
>>> 1>-- Build started: Project: Boost, Configuration: Debug x64 --
>>> 1>Creating directories for 'Boost'
>>> 1>No download step for 'Boost'
>>> 1>No patch step for 'Boost'
>>> 1>No update step for 'Boost'
>>> 1>Performing configure step for 'Boost'
>>> 1>Building Boost.Build engine
>>> ...
>>> 1>Generating Code...
>>> 1>Bootstrapping is done. To build, run:
>>> 1>    .\b2
>>> 1>
>>> 1>To adjust configuration, edit 'project-config.jam'.
>>> 1>Further information:
>>> 1>    - Command line help:
>>> 1>    .\b2 --help
>>> 1>
>>> 1>    - Getting started guide:
>>> 1>    http://boost.org/more/getting_started/windows.html
>>> 1>
>>> 1>    - Boost.Build documentation:
>>> 1>    http://www.boost.org/boost-build2/doc/html/index.html
>>> 1>Performing build step for 'Boost'
>>> 1>has_icu_test.cpp
>>> 1>Performing configuration checks
>>> ...
>>>
>>> And it goes on to build from there.
>>>
>>>
>>> I'm using CMake 2.8.6. Is there some way I can work around this, or
>>> should I file a bug?
>>>
>>> Thanks,
>>> Ben
>>> --
>>>
>>> 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] Boost external project doesn't build with VS2010 generator

2011-10-26 Thread Ben Medina
David,

Yes, adding "call" to the front of the command works. Thanks! Would be
great to get that fixed for 2.8.7, as I spent a good portion of
yesterday racking my brain about this.

I also discovered that, if using a variable to build the
CONFIGURE_COMMAND, that variable should be a list, rather than a
space-separated string. Would be nice to document that, too.

Thanks,
Ben

On Tue, Oct 25, 2011 at 6:51 PM, David Cole  wrote:
> Try changing the configure command to "call bootstrap.bat" instead.
> I suspect this is related to the symptoms reported in these bugs:
>   http://public.kitware.com/Bug/view.php?id=12445
>   http://public.kitware.com/Bug/view.php?id=12461
>
> Related to using "bat" or "cmd" files as custom commands. We need to get
> those fixed for 2.8.7 in the VS 2010 generator.
> Let me know if adding "call " to the front of the command works in this
> case.
>
> Thanks,
> David
>
> On Tue, Oct 25, 2011 at 5:30 PM, Ben Medina  wrote:
>>
>> Hello all,
>>
>> I'm trying to build Boost as an external project, but it won't build
>> if I use the VS2010 generator. I've whittled the code down to the
>> following CMakeLists.txt:
>>
>> cmake_minimum_required(VERSION 2.8)
>> project (boost-external)
>>
>> set (Boost_Source "E:/boost_1_47_0")
>>
>> include(ExternalProject)
>> ExternalProject_Add(
>>    Boost
>>    SOURCE_DIR "${Boost_Source}"
>>    UPDATE_COMMAND ""
>>    BUILD_IN_SOURCE 1
>>    CONFIGURE_COMMAND bootstrap.bat
>>    BUILD_COMMAND b2 install
>>    INSTALL_COMMAND ""
>>    )
>>
>> When I build the project, the configure step happens, but the build
>> step is skipped:
>>
>> Microsoft (R) Visual Studio Version 10.0.40219.1.
>> Copyright (C) Microsoft Corp. All rights reserved.
>> 2>-- Build started: Project: Boost, Configuration: Debug x64 --
>> 2>  Performing configure step for 'Boost'
>> 2>  Building Boost.Build engine
>> 2>
>> 2>  Bootstrapping is done. To build, run:
>> 2>
>> 2>      .\b2
>> 2>
>> 2>  To adjust configuration, edit 'project-config.jam'.
>> 2>  Further information:
>> 2>
>> 2>      - Command line help:
>> 2>      .\b2 --help
>> 2>
>> 2>      - Getting started guide:
>> 2>      http://boost.org/more/getting_started/windows.html
>> 2>
>> 2>      - Boost.Build documentation:
>> 2>      http://www.boost.org/boost-build2/doc/html/index.html
>> 3>-- Build started: Project: ALL_BUILD, Configuration: Debug x64
>> --
>> 3>  Build all projects
>> == Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped
>> ==
>>
>> When I use the VS2008 generator, the project builds as expected:
>>
>> Microsoft (R) Visual Studio Version 9.0.30729.1.
>> Copyright (C) Microsoft Corp. All rights reserved.
>> 1>-- Build started: Project: Boost, Configuration: Debug x64 --
>> 1>Creating directories for 'Boost'
>> 1>No download step for 'Boost'
>> 1>No patch step for 'Boost'
>> 1>No update step for 'Boost'
>> 1>Performing configure step for 'Boost'
>> 1>Building Boost.Build engine
>> ...
>> 1>Generating Code...
>> 1>Bootstrapping is done. To build, run:
>> 1>    .\b2
>> 1>
>> 1>To adjust configuration, edit 'project-config.jam'.
>> 1>Further information:
>> 1>    - Command line help:
>> 1>    .\b2 --help
>> 1>
>> 1>    - Getting started guide:
>> 1>    http://boost.org/more/getting_started/windows.html
>> 1>
>> 1>    - Boost.Build documentation:
>> 1>    http://www.boost.org/boost-build2/doc/html/index.html
>> 1>Performing build step for 'Boost'
>> 1>has_icu_test.cpp
>> 1>Performing configuration checks
>> ...
>>
>> And it goes on to build from there.
>>
>>
>> I'm using CMake 2.8.6. Is there some way I can work around this, or
>> should I file a bug?
>>
>> Thanks,
>> Ben
>> --
>>
>> 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] Boost external project doesn't build with VS2010 generator

2011-10-25 Thread David Cole
Try changing the configure command to "call bootstrap.bat" instead.

I suspect this is related to the symptoms reported in these bugs:

  http://public.kitware.com/Bug/view.php?id=12445
  http://public.kitware.com/Bug/view.php?id=12461

Related to using "bat" or "cmd" files as custom commands. We need to get
those fixed for 2.8.7 in the VS 2010 generator.

Let me know if adding "call " to the front of the command works in this
case.


Thanks,
David


On Tue, Oct 25, 2011 at 5:30 PM, Ben Medina  wrote:

> Hello all,
>
> I'm trying to build Boost as an external project, but it won't build
> if I use the VS2010 generator. I've whittled the code down to the
> following CMakeLists.txt:
>
> cmake_minimum_required(VERSION 2.8)
> project (boost-external)
>
> set (Boost_Source "E:/boost_1_47_0")
>
> include(ExternalProject)
> ExternalProject_Add(
>Boost
>SOURCE_DIR "${Boost_Source}"
>UPDATE_COMMAND ""
>BUILD_IN_SOURCE 1
>CONFIGURE_COMMAND bootstrap.bat
>BUILD_COMMAND b2 install
>INSTALL_COMMAND ""
>)
>
> When I build the project, the configure step happens, but the build
> step is skipped:
>
> Microsoft (R) Visual Studio Version 10.0.40219.1.
> Copyright (C) Microsoft Corp. All rights reserved.
> 2>-- Build started: Project: Boost, Configuration: Debug x64 --
> 2>  Performing configure step for 'Boost'
> 2>  Building Boost.Build engine
> 2>
> 2>  Bootstrapping is done. To build, run:
> 2>
> 2>  .\b2
> 2>
> 2>  To adjust configuration, edit 'project-config.jam'.
> 2>  Further information:
> 2>
> 2>  - Command line help:
> 2>  .\b2 --help
> 2>
> 2>  - Getting started guide:
> 2>  http://boost.org/more/getting_started/windows.html
> 2>
> 2>  - Boost.Build documentation:
> 2>  http://www.boost.org/boost-build2/doc/html/index.html
> 3>-- Build started: Project: ALL_BUILD, Configuration: Debug x64 --
> 3>  Build all projects
> == Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==
>
> When I use the VS2008 generator, the project builds as expected:
>
> Microsoft (R) Visual Studio Version 9.0.30729.1.
> Copyright (C) Microsoft Corp. All rights reserved.
> 1>-- Build started: Project: Boost, Configuration: Debug x64 --
> 1>Creating directories for 'Boost'
> 1>No download step for 'Boost'
> 1>No patch step for 'Boost'
> 1>No update step for 'Boost'
> 1>Performing configure step for 'Boost'
> 1>Building Boost.Build engine
> ...
> 1>Generating Code...
> 1>Bootstrapping is done. To build, run:
> 1>.\b2
> 1>
> 1>To adjust configuration, edit 'project-config.jam'.
> 1>Further information:
> 1>- Command line help:
> 1>.\b2 --help
> 1>
> 1>- Getting started guide:
> 1>http://boost.org/more/getting_started/windows.html
> 1>
> 1>- Boost.Build documentation:
> 1>http://www.boost.org/boost-build2/doc/html/index.html
> 1>Performing build step for 'Boost'
> 1>has_icu_test.cpp
> 1>Performing configuration checks
> ...
>
> And it goes on to build from there.
>
>
> I'm using CMake 2.8.6. Is there some way I can work around this, or
> should I file a bug?
>
> Thanks,
> Ben
> --
>
> 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

[CMake] Boost external project doesn't build with VS2010 generator

2011-10-25 Thread Ben Medina
Hello all,

I'm trying to build Boost as an external project, but it won't build
if I use the VS2010 generator. I've whittled the code down to the
following CMakeLists.txt:

cmake_minimum_required(VERSION 2.8)
project (boost-external)

set (Boost_Source "E:/boost_1_47_0")

include(ExternalProject)
ExternalProject_Add(
Boost
SOURCE_DIR "${Boost_Source}"
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND bootstrap.bat
BUILD_COMMAND b2 install
INSTALL_COMMAND ""
)

When I build the project, the configure step happens, but the build
step is skipped:

Microsoft (R) Visual Studio Version 10.0.40219.1.
Copyright (C) Microsoft Corp. All rights reserved.
2>-- Build started: Project: Boost, Configuration: Debug x64 --
2>  Performing configure step for 'Boost'
2>  Building Boost.Build engine
2>
2>  Bootstrapping is done. To build, run:
2>
2>  .\b2
2>
2>  To adjust configuration, edit 'project-config.jam'.
2>  Further information:
2>
2>  - Command line help:
2>  .\b2 --help
2>
2>  - Getting started guide:
2>  http://boost.org/more/getting_started/windows.html
2>
2>  - Boost.Build documentation:
2>  http://www.boost.org/boost-build2/doc/html/index.html
3>-- Build started: Project: ALL_BUILD, Configuration: Debug x64 --
3>  Build all projects
== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==

When I use the VS2008 generator, the project builds as expected:

Microsoft (R) Visual Studio Version 9.0.30729.1.
Copyright (C) Microsoft Corp. All rights reserved.
1>-- Build started: Project: Boost, Configuration: Debug x64 --
1>Creating directories for 'Boost'
1>No download step for 'Boost'
1>No patch step for 'Boost'
1>No update step for 'Boost'
1>Performing configure step for 'Boost'
1>Building Boost.Build engine
...
1>Generating Code...
1>Bootstrapping is done. To build, run:
1>.\b2
1>
1>To adjust configuration, edit 'project-config.jam'.
1>Further information:
1>- Command line help:
1>.\b2 --help
1>
1>- Getting started guide:
1>http://boost.org/more/getting_started/windows.html
1>
1>- Boost.Build documentation:
1>http://www.boost.org/boost-build2/doc/html/index.html
1>Performing build step for 'Boost'
1>has_icu_test.cpp
1>Performing configuration checks
...

And it goes on to build from there.


I'm using CMake 2.8.6. Is there some way I can work around this, or
should I file a bug?

Thanks,
Ben
--

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 macro behavior with respect to version

2011-02-12 Thread Michael Hertling
On 02/10/2011 09:17 PM, Adams, Brian M wrote:
> I'm curious if the behavior I'm seeing with respect to FindBoost.cmake is 
> expected.  (I realize I'm using these macros in a convoluted way, so 
> understand if I can't make it work more cleanly.)
> 
> What I'd like to be able to do is something like the following to probe for a 
> system-provided or user-specified Boost, but then fall back on a distributed 
> one that comes with our software as needed (probably in config instead of 
> module mode, but that's for another day):
> 
> find_package(Boost 1.40)
> if (NOT Boost_FOUND)
>   set(BOOST_ROOT /path/to/boost/in/our/tree)
>   find_package(Boost 1.40 REQUIRED)
> endif()
> 
> I get problems with this, e.g., on RHEL5, which has Boost 1.33 installed.  
> The first find fails due to version too low, then the second find doesn't 
> probe because it detects Boost settings in the cache.  After the first probe 
> (and in the end) Boost_FOUND is false, AND the include and lib dirs for Boost 
> are set to the 1.33 install location, which is misleading.  It seems odd to 
> me that these variables get set even though the probe failed.
> 
> I can perform a workaround where I trick FindBoost.cmake to not use the cache:
> 
> find_package(Boost 1.40)
> if (NOT Boost_FOUND)
>   unset(Boost_INCLUDE_DIR CACHE)
>   # these not needed, but could do to be safe:
>   #unset(Boost_LIBRARY_DIRS CACHE)
>   #unset(Boost_LIB_VERSION CACHE)
>   #unset(Boost_VERSION CACHE)
>   set(BOOST_ROOT /path/to/boost/in/our/tree)
>   find_package(Boost 1.40)
> endif()
> 
> Then I end up with the 1.40 that I'd expect.  This seems likely to bite me 
> down the road.  How (besides requiring the user to have sufficiently new 
> Boost on their system), should I handle this?
> 
> Thanks,
> Brian

Without having inspected FindBoost.cmake in detail, I think what you
report here is a fundamental problem of find modules in general: They
don't clean up if they're about to return with a negative result, i.e.
XXX_FOUND==FALSE. Particularly, they leave variables in the cache that
stem from diverse find function calls, and if some of these calls have
succeeded, a following invocation of the same module can't perform the
search again because the find functions are prevented to do so by the
positive results in the cache.

Even quite simple find modules like FindJPEG.cmake show that behaviour:
Suppose you've the runtime component, i.e. the library only, installed
from the distribution and another full installation in, say, /opt/jpeg.
If you say FIND_PACKAGE(JPEG) without hinting CMake at the latter path,
you would end up with JPEG_FOUND==FALSE as well as JPEG_INCLUDE_DIR==
JPEG_INCLUDE_DIR-NOTFOUND but JPEG_LIBRARY==/usr/lib/libjpeg.so, so a
following FIND_PACKAGE(JPEG) with, e.g., CMAKE_PREFIX_PATH==/opt/jpeg
set before will result in JPEG_FOUND==TRUE with

JPEG_INCLUDE_DIR==/opt/jpeg/include
JPEG_LIBRARY==/usr/lib/libjpeg.so

which means a non-matching combination of header and library.

While one hardly calls FindJPEG.cmake more than once in this manner,
there're quite good occasions to do so with more complex find modules
like FindBoost.cmake, especially if they support the specification of
a version via FIND_PACKAGE() as your scenario clearly shows, cf. [1].

An obvious solution would be to unset the concerned variables in the
cache if the module is going to return with a negative result so that
a subsequent invocation of the find module can start all over again.
OTOH, if you configure with -DXXX_LIBRARY=... on the command line or
a GUI, you'd probably expect this to be respected by all invocations
of FindXXX.cmake throughout the entire project, so the module would
need to keep track of which variables are passed in from the outside
and which ones are actually set by the module. Of course, this would
complicate things a lot when writing find modules.

IMO, the best approach to address this issue in your case is the one
you presented above: Explicitly unset the concerned variables in the
cache before performing the search again with a modified BOOST_ROOT.
Alternatively, you might simply bail out if Boost 1.40 has not been
found and instruct the user to throw away the cache and reconfigure
with BOOST_ROOT set appropriately - or provide a dedicated option,
e.g. USE_INTERNAL_BOOST, to handle this in your CMakeLists.txt.

Note that there's no such issue with configuration files: A negative
result from FIND_PACKAGE() in config mode means that no config file
has been found or all version files have declared their package as
incompatibe. In either case, no config file has been processed, so
there can't be any legacies in the cache.

Regards,

Michael

[1] http://www.mail-archive.com/cmake@cmake.org/msg34515.html
___
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/CM

Re: [CMake] Boost macro behavior with respect to version

2011-02-10 Thread Ryan Pavlik
I'm not entirely sure why FindBoost uses the cache in the way it does, as it
seems to cause a fair amount of issues.  I've made an experimental
modification of FindBoost.cmake that doesn't use internal cache variables
here: [1] It seems to work in my initial tests, but it's probably not ideal
and I haven't tested it further.

Ryan

[1]
https://github.com/rpavlik/cmake-modules/blob/rework-boost/cmake-2.8.4-modules/boost/FindBoost.cmake

On Thu, Feb 10, 2011 at 2:17 PM, Adams, Brian M  wrote:

>  I’m curious if the behavior I’m seeing with respect to FindBoost.cmake is
> expected.  (I realize I’m using these macros in a convoluted way, so
> understand if I can’t make it work more cleanly.)
>
> What I’d like to be able to do is something like the following to probe for
> a system-provided or user-specified Boost, but then fall back on a
> distributed one that comes with our software as needed (probably in config
> instead of module mode, but that’s for another day):
>
> find_package(Boost 1.40)
> if (NOT Boost_FOUND)
>   set(BOOST_ROOT /path/to/boost/in/our/tree)
>   find_package(Boost 1.40 REQUIRED)
> endif()
>
> I get problems with this, e.g., on RHEL5, which has Boost 1.33 installed.
> The first find fails due to version too low, then the second find doesn’t
> probe because it detects Boost settings in the cache.  After the first probe
> (and in the end) Boost_FOUND is false, AND the include and lib dirs for
> Boost are set to the 1.33 install location, which is misleading.  It seems
> odd to me that these variables get set even though the probe failed.
>
> I can perform a workaround where I trick FindBoost.cmake to not use the
> cache:
>
> find_package(Boost 1.40)
> if (NOT Boost_FOUND)
>   unset(Boost_INCLUDE_DIR CACHE)
>   # these not needed, but could do to be safe:
>   #unset(Boost_LIBRARY_DIRS CACHE)
>   #unset(Boost_LIB_VERSION CACHE)
>   #unset(Boost_VERSION CACHE)
>   set(BOOST_ROOT /path/to/boost/in/our/tree)
>   find_package(Boost 1.40)
> endif()
>
> Then I end up with the 1.40 that I’d expect.  This seems likely to bite me
> down the road.  How (besides requiring the user to have sufficiently new
> Boost on their system), should I handle this?
>
> Thanks,
> Brian
>
>
>
>
> ___
> 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
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
___
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 macro behavior with respect to version

2011-02-10 Thread Adams, Brian M
I'm curious if the behavior I'm seeing with respect to FindBoost.cmake is 
expected.  (I realize I'm using these macros in a convoluted way, so understand 
if I can't make it work more cleanly.)

What I'd like to be able to do is something like the following to probe for a 
system-provided or user-specified Boost, but then fall back on a distributed 
one that comes with our software as needed (probably in config instead of 
module mode, but that's for another day):

find_package(Boost 1.40)
if (NOT Boost_FOUND)
  set(BOOST_ROOT /path/to/boost/in/our/tree)
  find_package(Boost 1.40 REQUIRED)
endif()

I get problems with this, e.g., on RHEL5, which has Boost 1.33 installed.  The 
first find fails due to version too low, then the second find doesn't probe 
because it detects Boost settings in the cache.  After the first probe (and in 
the end) Boost_FOUND is false, AND the include and lib dirs for Boost are set 
to the 1.33 install location, which is misleading.  It seems odd to me that 
these variables get set even though the probe failed.

I can perform a workaround where I trick FindBoost.cmake to not use the cache:

find_package(Boost 1.40)
if (NOT Boost_FOUND)
  unset(Boost_INCLUDE_DIR CACHE)
  # these not needed, but could do to be safe:
  #unset(Boost_LIBRARY_DIRS CACHE)
  #unset(Boost_LIB_VERSION CACHE)
  #unset(Boost_VERSION CACHE)
  set(BOOST_ROOT /path/to/boost/in/our/tree)
  find_package(Boost 1.40)
endif()

Then I end up with the 1.40 that I'd expect.  This seems likely to bite me down 
the road.  How (besides requiring the user to have sufficiently new Boost on 
their system), should I handle this?

Thanks,
Brian



___
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 and multiplatform configurations

2010-12-02 Thread Dmytro Ovdiienko
Hello all,

I have a library that depends on boost. One user of this library compiles
only x32 version. Second user compiles x64. Third user compiles both x32 and
x64.

First user has only x32 version of the boost in the BOOST_LIBRARYDIR.
Second user only x64 version in the BOOST_LIBRARYDIR.
Third user has both x32 in the BOOST_LIBRARYDIR/x32 and x64 version in the
BOOST_LIBRARYDIR/x64.

The question is how to configure boost to search BOOST_LIBRARYDIR/
folder first then BOOST_LIBRARYDIR?
BOOST_LIBRARYDIR does not support values list. Previous CMake 2.6 version
used to support list of the values.

Thanks.


-- 
Dmytro Ovdiienko
___
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 Library Search

2010-10-06 Thread Philip Lowman
On Wed, Oct 6, 2010 at 7:55 PM, assume_R  wrote:

> Hey all.  So I noticed a possible bug with the way boost is searched in
> findboost.cmake.
>
> Essentially, if you have the boost static runtimes installed, that's what
> Visual Studio will require.  For example, using the thread library, it will
> need libboost_thread*-sgd*
>
> Yet the non-static-runtime versions are what are searched first, so it only
> finds libboost_thread*-gd*, and visual studio will give you a link error.
>

Yes, this is issue #11204.  FindBoost searches for static libraries first
with the -gd & then -sgd prefix in that order when Boost_USE_STATIC_LIBS is
enabled.  There was no way to specify if you preferred the static library
built against a dynamic runtime, or the static library built against a
static runtime.
http://www.cmake.org/Bug/view.php?id=11204

Changing the behavior the way you specified could potentially break people
that prefer the static boost libraries but with a dynamic runtime, so a
better solution was needed.  The new version of FindBoost (which is in
2.8.3-rc2) allows you to set a new option (Boost_USE_STATIC_RUNTIME) which
allows picking either a static or dynamic runtime.  By default FindBoost
maintains existing behavior of searching for dynamic then static on WIN32
(since that is the only platform we had this behavior before).  On other
platforms this wasn't an issue and the dynamic runtime was always used so
the existing behavior is maintained there since the user must opt-in to
setting Boost_USE_STATIC_RUNTIME.

If you try out FindBoost in 2.8.3-rc2 you'll see a reference to
Boost_COMPAT_STATIC_RUNTIME which disables the double search behavior if set
to OFF.  You can set this to OFF for now, but I realized the variable is
redundant so if there are more RC's for CMake 2.8.3, I plan on removing it
and just counting on if the user has defined Boost_USE_STATIC_RUNTIME or not
(regardless if they set it ON or OFF) to disable the "double" search on
WIN32.

-- 
Philip Lowman
___
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 Library Search

2010-10-06 Thread David Cole
Philip Lowman recently took the mantle for the FindBoost maintenance. He
fixed a bunch of stuff just now for the upcoming (now in release candidate
phase) CMake 2.8.3 release...

Are you reporting this based on CMake 2.8.3-rc2 or an earlier release of
CMake?

Try using the release candidate. I know he did some stuff to make it
possible to prefer static libs specifically.


Thanks,
David


On Wed, Oct 6, 2010 at 7:55 PM, assume_R  wrote:

> Hey all.  So I noticed a possible bug with the way boost is searched in
> findboost.cmake.
>
> Essentially, if you have the boost static runtimes installed, that's what
> Visual Studio will require.  For example, using the thread library, it will
> need libboost_thread*-sgd*
>
> Yet the non-static-runtime versions are what are searched first, so it only
> finds libboost_thread*-gd*, and visual studio will give you a link error.
>
> The reason is that on lines 718 - 738 of findboost.cmake, it defines the
> NAMES of the boost_STATIC_TAG after it already lists the same version
> without the boost_STATIC_TAG.
>
> So what needs to be done is instead of
>
> FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
> NAMES
>  
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
>${Boost_LIB_PREFIX}boost_${COMPONENT}
> HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
> )
>
>
>
> it should be
>
>
>
> FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
> NAMES
>  
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
>${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
>${Boost_LIB_PREFIX}boost_${COMPONENT}
> HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
> )
>
> Anybody know who the maintainer is??
>
> -assumeR
>
> ___
> 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

[CMake] Boost Library Search

2010-10-06 Thread assume_R
Hey all.  So I noticed a possible bug with the way boost is searched in
findboost.cmake.

Essentially, if you have the boost static runtimes installed, that's what
Visual Studio will require.  For example, using the thread library, it will
need libboost_thread*-sgd*

Yet the non-static-runtime versions are what are searched first, so it only
finds libboost_thread*-gd*, and visual studio will give you a link error.

The reason is that on lines 718 - 738 of findboost.cmake, it defines the
NAMES of the boost_STATIC_TAG after it already lists the same version
without the boost_STATIC_TAG.

So what needs to be done is instead of

FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
NAMES
 
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}
HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
)



it should be



FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
NAMES
 
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}

${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
   ${Boost_LIB_PREFIX}boost_${COMPONENT}
HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
)

Anybody know who the maintainer is??

-assumeR
___
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 lib error when linking executable

2010-08-24 Thread John Drescher
>. I guess those 32.lib libraries are 64 bit, even though the names suggest 
>otherwise (yay for Microsoft).
>
I did not know that. Sorry. I admit, I have not looked at the lib
names on my 64 bit builds.

John
___
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 lib error when linking executable

2010-08-24 Thread Oenen, Jodi van
Ah, my mistake. The Microsoft Win 2003 SP1 x64 platform SDK has been installed 
on the machine, and the LIB variable has been updated; 32.lib libraries are 
now found in C:\Program Files\Microsoft Platform SDK\Lib\AMD64. I guess those 
32.lib libraries are 64 bit, even though the names suggest otherwise (yay 
for Microsoft).

So... Any other suggestions? :)

Jodi

-Original Message-
From: John Drescher [mailto:dresche...@gmail.com] 
Sent: dinsdag 24 augustus 2010 16:20
To: Oenen, Jodi van; CMake mailing list
Subject: Re: [CMake] Boost lib error when linking executable

> True :)
>
> As I said, I'm just replicating the current Make system, in which those same 
> 32 bit libs are used -- and it works. CMake even adds some extra 32 bit libs 
> to the command line; I think they are added in Windows-icl.cmake 
> (CMAKE_C_STANDARD_LIBRARIES_INIT). So I'd say it should also work in CMake :)
>

I am pretty sure you can not mix 32 bit and 64 bit libraries in the
same application.

John
___
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 lib error when linking executable

2010-08-24 Thread John Drescher
> True :)
>
> As I said, I'm just replicating the current Make system, in which those same 
> 32 bit libs are used -- and it works. CMake even adds some extra 32 bit libs 
> to the command line; I think they are added in Windows-icl.cmake 
> (CMAKE_C_STANDARD_LIBRARIES_INIT). So I'd say it should also work in CMake :)
>

I am pretty sure you can not mix 32 bit and 64 bit libraries in the
same application.

John
___
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 lib error when linking executable

2010-08-24 Thread John Drescher
On Tue, Aug 24, 2010 at 9:57 AM, Oenen, Jodi van
 wrote:
> Hi,
>
> We are migrating an 'old' Make project into the CMake world, and I am 
> encountering a problem during the link phase of one of our executables: the 
> linker cannot open a boost library.
>
> I am using CMake 2.8.2 on WinXP x64, Boost regex library 1.33.1, with Intel 
> C++/Fortran 9.1 compilers (icl/ifort), and Visual Studio 2005 (VS80) for 
> linking. I am not using a FindBOOST module (yet); I'm just replicating the 
> current Make environment for now, i.e. I have hardcoded the boost include 
> directory and the library which should be statically linked into the 
> executable. In the current Make system this works fine.
>
> However, this is what CMake says:
>
> 
> C:\build\src\bsaf>"c:\Program Files (x86)\Microsoft Visual Studio 
> 8\vc\bin\nmake
> .exe" bsaf_exe/fast VERBOSE=TRUE
>
> Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
> Copyright (C) Microsoft Corporation.  All rights reserved.
>
>        cd C:\build
>        "c:\Program Files (x86)\Microsoft Visual Studio 8\vc\bin\nmake.exe" -f 
> s
> rc\bsaf\CMakeFiles\bsaf_exe.dir\build.make /nologo -                   
> src\bsaf\
> CMakeFiles\bsaf_exe.dir\build
> Linking CXX executable \em64t-win_cmake\bin\bsaf.exe
>        cd C:\build\src\bsaf
>        "C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E vs_link_exe 
> C:\PROGR
> A~2\Intel\Compiler\C__~1\9.1\EM64T\Bin\icl.exe  /nologo 
> @C:\DOCUME~1\ADMINI~1\LO
> CALS~1\Temp\nm6860.tmp
> Visual Studio Non-Incremental Link
> LINK:
> C:\PROGRA~2\Intel\Compiler\C__~1\9.1\EM64T\Bin\icl.exe /nologo -nologo -GX 
> -G7 -
> W1 -D_CONSOLE -D_MBCS @CMakeFiles\bsaf_exe.dir\objects1.rsp 
> /Fe\em64t-win_cmake\
> bin\bsaf.exe -link /implib:bsaf.lib -nologo -subsystem:console 
> -incremental:no -
> stack:6400 /INCREMENTAL:NO /subsystem:console -MACHINE:X64 
> \em64t-win_cmake\
> lib\bsaf\bsaf.lib \em64t-win_cmake\lib\ulib\saf.lib 
> \em64t-win_cmake\lib\ulib\do
> m.lib \em64t-win_cmake\lib\ulib\domf2c.lib 
> \em64t-win_cmake\lib\ulib\mifparser.l
> ib \em64t-win_cmake\lib\ulib\ffilio.lib \em64t-win_cmake\lib\ulib\errmsg.lib 
> \em
> 64t-win_cmake\lib\ulib\dynmemmgr.lib \em64t-win_cmake\lib\ulib\strings.lib 
> \em64
> t-win_cmake\lib\bsaf\bsaf.lib \em64t-win_cmake\lib\ulib\system.lib 
> \em64t-win_cm
> ake\lib\ulib\filetb.lib \em64t-win_cmake\lib\ulib\timer.lib 
> \em64t-win_cmake\lib
> \ulib\csys.lib C:\Users\madymo\em64t-win\ext\lib\xerces-c_1.lib 
> C:\Users\madymo\
> em64t-win\ext\boost\lib\libboost_regex-iw-mt-1_33_1.lib -lpthread -lm 
> libifcorem
> t.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib 
> advapi32.lib s
> hell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib 
> win
> spool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib 
> uuid.lib
> /MANIFEST
> Fatal error cannot open "libboost_regex-iw-mt-s-1_33_1.lib"
> icl: error: problem during multi-file optimization compilation (code 1)
> LINK failed. with 1
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' 
> :
> return code '0x'
> Stop.
> NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 
> 8\vc
> \bin\nmake.exe"' : return code '0x2'
> Stop.
> 
>
> The linker cannot open "libboost_regex-iw-mt-s-1_33_1.lib"! I know the 
> libboost_regex-iw-mt-s-1_33_1.lib library is on my disk, at the correct 
> location (I can find it with 'dir 
> C:\Users\madymo\em64t-win\ext\boost\lib\libboost_regex-iw-mt-1_33_1.lib'). I 
> have full permissions on the file. When I change 
> "libboost_regex-iw-mt-s-1_33_1.lib" to "libboost_regex-vc80-mt-s-1_33_1.lib" 
> in my CMakeLists.txt file, CMake shows the same error: it complains about not 
> being able to open "libboost_regex-iw-mt-s-1_33_1.lib"(!!).
>
> Any ideas on what's going on?
>

Looks like you are mixing 64 bit and 32 bit libs.

John
___
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 lib error when linking executable

2010-08-24 Thread Oenen, Jodi van
Hi,

We are migrating an 'old' Make project into the CMake world, and I am 
encountering a problem during the link phase of one of our executables: the 
linker cannot open a boost library.

I am using CMake 2.8.2 on WinXP x64, Boost regex library 1.33.1, with Intel 
C++/Fortran 9.1 compilers (icl/ifort), and Visual Studio 2005 (VS80) for 
linking. I am not using a FindBOOST module (yet); I'm just replicating the 
current Make environment for now, i.e. I have hardcoded the boost include 
directory and the library which should be statically linked into the 
executable. In the current Make system this works fine.

However, this is what CMake says:


C:\build\src\bsaf>"c:\Program Files (x86)\Microsoft Visual Studio 8\vc\bin\nmake
.exe" bsaf_exe/fast VERBOSE=TRUE

Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation.  All rights reserved.

cd C:\build
"c:\Program Files (x86)\Microsoft Visual Studio 8\vc\bin\nmake.exe" -f s
rc\bsaf\CMakeFiles\bsaf_exe.dir\build.make /nologo -   src\bsaf\
CMakeFiles\bsaf_exe.dir\build
Linking CXX executable \em64t-win_cmake\bin\bsaf.exe
cd C:\build\src\bsaf
"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe" -E vs_link_exe C:\PROGR
A~2\Intel\Compiler\C__~1\9.1\EM64T\Bin\icl.exe  /nologo @C:\DOCUME~1\ADMINI~1\LO
CALS~1\Temp\nm6860.tmp
Visual Studio Non-Incremental Link
LINK:
C:\PROGRA~2\Intel\Compiler\C__~1\9.1\EM64T\Bin\icl.exe /nologo -nologo -GX -G7 -
W1 -D_CONSOLE -D_MBCS @CMakeFiles\bsaf_exe.dir\objects1.rsp /Fe\em64t-win_cmake\
bin\bsaf.exe -link /implib:bsaf.lib -nologo -subsystem:console -incremental:no -
stack:6400 /INCREMENTAL:NO /subsystem:console -MACHINE:X64 \em64t-win_cmake\
lib\bsaf\bsaf.lib \em64t-win_cmake\lib\ulib\saf.lib \em64t-win_cmake\lib\ulib\do
m.lib \em64t-win_cmake\lib\ulib\domf2c.lib \em64t-win_cmake\lib\ulib\mifparser.l
ib \em64t-win_cmake\lib\ulib\ffilio.lib \em64t-win_cmake\lib\ulib\errmsg.lib \em
64t-win_cmake\lib\ulib\dynmemmgr.lib \em64t-win_cmake\lib\ulib\strings.lib \em64
t-win_cmake\lib\bsaf\bsaf.lib \em64t-win_cmake\lib\ulib\system.lib \em64t-win_cm
ake\lib\ulib\filetb.lib \em64t-win_cmake\lib\ulib\timer.lib \em64t-win_cmake\lib
\ulib\csys.lib C:\Users\madymo\em64t-win\ext\lib\xerces-c_1.lib C:\Users\madymo\
em64t-win\ext\boost\lib\libboost_regex-iw-mt-1_33_1.lib -lpthread -lm libifcorem
t.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib s
hell32.lib ole32.lib oleaut32.lib uuid.lib kernel32.lib user32.lib gdi32.lib win
spool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib
/MANIFEST
Fatal error cannot open "libboost_regex-iw-mt-s-1_33_1.lib"
icl: error: problem during multi-file optimization compilation (code 1)
LINK failed. with 1
NMAKE : fatal error U1077: '"C:\Program Files (x86)\CMake 2.8\bin\cmake.exe"' :
return code '0x'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 8\vc
\bin\nmake.exe"' : return code '0x2'
Stop.


The linker cannot open "libboost_regex-iw-mt-s-1_33_1.lib"! I know the 
libboost_regex-iw-mt-s-1_33_1.lib library is on my disk, at the correct 
location (I can find it with 'dir 
C:\Users\madymo\em64t-win\ext\boost\lib\libboost_regex-iw-mt-1_33_1.lib'). I 
have full permissions on the file. When I change 
"libboost_regex-iw-mt-s-1_33_1.lib" to "libboost_regex-vc80-mt-s-1_33_1.lib" in 
my CMakeLists.txt file, CMake shows the same error: it complains about not 
being able to open "libboost_regex-iw-mt-s-1_33_1.lib"(!!).

Any ideas on what's going on?

Thanks, and best regards,
Jodi van Oenen
___
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 on Windows

2009-06-23 Thread Andreas Pakulat
On 23.06.09 16:51:05, Michael Jackson wrote:
> Boost uses the following version scheme:
>
> If the sub minor version is "0" then leave it off all versions. If the  
> subminor version is NOT zero then add it on. So for versions like 1.38.1 
> FindBoost will work just fine. But for 1.38 (the current version), then 
> it simply will not find boost.

As I said in the other reply, I think there were cases where it actually
didn't stick to that versioning scheme. At least there's a reason why
the known-versions variable has things like 1.35.0

Andreas

-- 
"Life, loathe it or ignore it, you can't like it."
-- Marvin, "Hitchhiker's Guide to the Galaxy"
___
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 on Windows

2009-06-23 Thread Andreas Pakulat
On 23.06.09 16:23:21, Bill Hoffman wrote:
> Christopher Harvey wrote:
>> define BOOST_ROOT and point it at the root install location for boost. I
>> had the same problem, that fixed it. I only had to do that on windows.
>>
> There seems to be a bug in the FindBoost, BOOST_ROOT should not be  
> required.   I got it to work by adding this:
>
>
>   SET(_boost_LIBRARIES_SEARCH_DIRS
> C:/boost/lib
> C:/boost
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
> "$ENV{ProgramFiles}/boost"
> /sw/local/lib
>   )
>
> Boost installed to here for me:
> c/Program\ Files/boost/boost_1_38/
>
> So the extra _${Boost_SUBMINOR_VERSION} is breaking the find.   CMake is  
> looking in boost_1_38_0.   Is that a special case for 0?  I don't think  
> both will hurt, so I guess I can check this in.

Well, unfortunately so far Boost people don't seem to have a stable
defintion of their include dir or release versions. Most new minor's are
released as major.minor, but sometimes they add a .subminor and it also
sometimes gets into the include-dir I think. Don't have enough boost
versions here to be sure about that though.

Anyway, yes the additional directory won't hurt.

Andreas

-- 
Go to a movie tonight.  Darkness becomes you.
___
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 on Windows

2009-06-23 Thread Bill Hoffman

John Drescher wrote:

On Tue, Jun 23, 2009 at 4:23 PM, Bill Hoffman wrote:

Christopher Harvey wrote:

define BOOST_ROOT and point it at the root install location for boost. I
had the same problem, that fixed it. I only had to do that on windows.


There seems to be a bug in the FindBoost, BOOST_ROOT should not be required.
  I got it to work by adding this:


 SET(_boost_LIBRARIES_SEARCH_DIRS
   C:/boost/lib
   C:/boost

"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"

"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
   "$ENV{ProgramFiles}/boost"
   /sw/local/lib
 )



That explains why I needed to do that on windows also. I do not have
boost in any of these locations...

I don't think boost puts anything in the registry, so if it is not in 
the "usual" install location, CMake will not find it without setting 
BOOST_ROOT.  However, a "usual" install should just work.  I have 
checked in the fix to CVS CMake.  If you install it somewhere else, you 
will have to set BOOST_ROOT env or set it in the cmake-gui.


-Bill
___
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 on Windows

2009-06-23 Thread Michael Jackson


On Jun 23, 2009, at 4:23 PM, Bill Hoffman wrote:


Christopher Harvey wrote:
define BOOST_ROOT and point it at the root install location for  
boost. I
had the same problem, that fixed it. I only had to do that on  
windows.
There seems to be a bug in the FindBoost, BOOST_ROOT should not be  
required.   I got it to work by adding this:



 SET(_boost_LIBRARIES_SEARCH_DIRS
   C:/boost/lib
   C:/boost
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_$ 
{Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_$ 
{Boost_MINOR_VERSION}/lib"

   "$ENV{ProgramFiles}/boost"
   /sw/local/lib
 )

Boost installed to here for me:
c/Program\ Files/boost/boost_1_38/

So the extra _${Boost_SUBMINOR_VERSION} is breaking the find.
CMake is looking in boost_1_38_0.   Is that a special case for 0?  I  
don't think both will hurt, so I guess I can check this in.




-Bill



Well, of course the trailing _0 is special. Why be consistent  



Boost uses the following version scheme:

If the sub minor version is "0" then leave it off all versions. If the  
subminor version is NOT zero then add it on. So for versions like  
1.38.1 FindBoost will work just fine. But for 1.38 (the current  
version), then it simply will not find boost.



And for the rest of us that install into non-standard locations, we  
set "BOOST_ROOT" so FindBoost.cmake will work.


Sure, check it in. Looks good.

Mike

PS: One of these days I'm going to add in a pile of debug statements  
so when boost can not be found full listings of where and what it is  
looking for can be printed. One of these days..




___
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 on Windows

2009-06-23 Thread Curtis Rueden
Hi Bill,

Thanks, adding another line to _boost_LIBRARIES_SEARCH_DIRS without the
Boost_SUBMINOR_VERSION fixes the problem for me as well. I agree that this
is a special case for 0, though -- there is some question whether the line
without the subminor version should be appended to the list if the subminor
version is e.g. 1 rather than 0.

-Curtis

On Tue, Jun 23, 2009 at 4:23 PM, Bill Hoffman wrote:

> Christopher Harvey wrote:
>
>> define BOOST_ROOT and point it at the root install location for boost. I
>> had the same problem, that fixed it. I only had to do that on windows.
>>
>>  There seems to be a bug in the FindBoost, BOOST_ROOT should not be
> required.   I got it to work by adding this:
>
>
>  SET(_boost_LIBRARIES_SEARCH_DIRS
>C:/boost/lib
>C:/boost
>
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
>
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
>"$ENV{ProgramFiles}/boost"
>/sw/local/lib
>  )
>
> Boost installed to here for me:
> c/Program\ Files/boost/boost_1_38/
>
> So the extra _${Boost_SUBMINOR_VERSION} is breaking the find.   CMake is
> looking in boost_1_38_0.   Is that a special case for 0?  I don't think both
> will hurt, so I guess I can check this in.
>
>
> -Bill
>
___
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 on Windows

2009-06-23 Thread John Drescher
On Tue, Jun 23, 2009 at 4:23 PM, Bill Hoffman wrote:
> Christopher Harvey wrote:
>>
>> define BOOST_ROOT and point it at the root install location for boost. I
>> had the same problem, that fixed it. I only had to do that on windows.
>>
> There seems to be a bug in the FindBoost, BOOST_ROOT should not be required.
>   I got it to work by adding this:
>
>
>  SET(_boost_LIBRARIES_SEARCH_DIRS
>    C:/boost/lib
>    C:/boost
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
>    "$ENV{ProgramFiles}/boost"
>    /sw/local/lib
>  )
>

That explains why I needed to do that on windows also. I do not have
boost in any of these locations...

John
___
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 on Windows

2009-06-23 Thread Andreas Pakulat
On 23.06.09 16:17:21, Curtis Rueden wrote:
> > Also, Looking at the CMakeLists.txt file it seems you are trying to parse
> > the Boost_THREAD library variable for something? If you are trying to
> > differentiate between the Release and Debug versions there are the following
> > variables for each boost library.
> >
> > Boost_PROGRAM_OPTIONS_LIBRARY
> > Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG
> > Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE
> >
> > Any of that help?
> >
> 
> Thanks, I didn't know about Boost_THREAD_LIBRARY_DEBUG. That helps me
> eliminate a little bit of code.
> 
> Anyway, Arnaud Gelas and I took a look at FindBoost.cmake, and discovered
> the problem. FIND_PATH is called to populate Boost_INCLUDE_DIR, but not
> until line 478 (CMake 2.6-patch4), whereas the components are checked before
> that (e.g., around line 303 there is an "IF(Boost_INCLUDE_DIR)" block that
> never executes).
> 
> Andreas, shouldn't FIND_PATH be called right away, and once the
> Boost_INCLUDE_DIR is known, then subsequently check for individual
> components of Boost?

You're misreading the FindBoost.cmake code apparently :)

First there's a bit of checking wether we've already found boost and
have stuff in the cache. Then there's setup of a couple of variables
(where to search boost, which versions, take BOOST_ROOT etc. into
account).

Then there's a loop going over the versions and appending a proper
versioned path to the list of include-dirs to be searched. (line 306 and
following, not sure which cmake 2.6 version I have here)

Then comes the find_path for the boost version header, from which the
actual version number is extracted (as there are installations that just
have /version.hpp and no version in the includedir)

Afterwards a bit of variables are setup to search for the various
possible names of libs and then under the heading "Begin finding the
boost libs" in line 438 are the actual libs being searched for.

That block you mention in line 303 is actually executed, but only on the
first run of cmake (or if boost is not found on that run also on
subsequent runs).

Andreas

-- 
You attempt things that you do not even plan because of your extreme stupidity.
___
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 on Windows

2009-06-23 Thread Bill Hoffman

Christopher Harvey wrote:

define BOOST_ROOT and point it at the root install location for boost. I
had the same problem, that fixed it. I only had to do that on windows.

There seems to be a bug in the FindBoost, BOOST_ROOT should not be 
required.   I got it to work by adding this:



  SET(_boost_LIBRARIES_SEARCH_DIRS
C:/boost/lib
C:/boost

"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"

"$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
"$ENV{ProgramFiles}/boost"
/sw/local/lib
  )

Boost installed to here for me:
c/Program\ Files/boost/boost_1_38/

So the extra _${Boost_SUBMINOR_VERSION} is breaking the find.   CMake is 
looking in boost_1_38_0.   Is that a special case for 0?  I don't think 
both will hurt, so I guess I can check this in.



-Bill
___
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 on Windows

2009-06-23 Thread Michael Jackson


On Jun 23, 2009, at 4:17 PM, Curtis Rueden wrote:


Hi Mike,

I use the boost pre-compiled all the time and I don't have any of  
these issues BUT I do set the BOOST_ROOT environment variable in "My  
Computer->Advanced Settings" after I install which may be the  
difference. I use threads, program_options, testing, filesystem and  
system.


Yes, the problem is that I do not explicitly set BOOST_ROOT.

I did notice in the FindBoost that there is a subtle difference in  
how the directory names are generated:


I think one has boost_1_38 while another has boost-1_38 depending on  
windows or unix.


From FindBoost.cmake in CMake version 2.6.4 around line 460


list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
if(WIN32)
# For BoostPro's underscores (and others?)
 list(APPEND _boost_PATH_SUFFIXES "boost_$ 
{_boost_BOOSTIFIED_VERSION}")

endif()

Interesting; I used the BoostPro installer so it is indeed all  
underscores (boost_1_38).


Do you actually have the Dynamic multi-threaded boost libs installed?

Yep, I have all types (single threaded vs. multi-threaded, static  
vs. shared) installed.


Also, Looking at the CMakeLists.txt file it seems you are trying to  
parse the Boost_THREAD library variable for something? If you are  
trying to differentiate between the Release and Debug versions there  
are the following variables for each boost library.


Boost_PROGRAM_OPTIONS_LIBRARY
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE

Any of that help?

Thanks, I didn't know about Boost_THREAD_LIBRARY_DEBUG. That helps  
me eliminate a little bit of code.


Anyway, Arnaud Gelas and I took a look at FindBoost.cmake, and  
discovered the problem. FIND_PATH is called to populate  
Boost_INCLUDE_DIR, but not until line 478 (CMake 2.6-patch4),  
whereas the components are checked before that (e.g., around line  
303 there is an "IF(Boost_INCLUDE_DIR)" block that never executes).


Andreas, shouldn't FIND_PATH be called right away, and once the  
Boost_INCLUDE_DIR is known, then subsequently check for individual  
components of Boost?


I think the conditional is if Boost_INCLUDE_DIR is _already_ in the  
cache because FindPackage(Boost.. ) has already been called once then  
this will short-circuit some of the tests so things go a bit  
quicker .. (I think).


Yes you are correct. FindBoost.cmake probably should be able to find  
BoostPro's _default_ installation without a problem. Patches are  
welcome ;-).


Mike

___
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 on Windows

2009-06-23 Thread Curtis Rueden
>
> define BOOST_ROOT and point it at the root install location for boost. I
> had the same problem, that fixed it. I only had to do that on windows.
>

Thanks Christopher, but I am aware of that fix. Actually, that's what my
hack does -- it uses CMake to set BOOST_ROOT programmatically. What I'm
getting at is that there is no reason FindBoost shouldn't be able to
successfully find Boost with a vanilla BoostPro install on Windows using
"find_package(Boost COMPONENTS thread REQUIRE)" (or whatever) when it can
successfully do so with just "find_package(Boost)" with no arguments.

-Curtis

On Tue, Jun 23, 2009 at 3:44 PM, Christopher Harvey
wrote:

> define BOOST_ROOT and point it at the root install location for boost. I
> had the same problem, that fixed it. I only had to do that on windows.
>
> Curtis Rueden wrote:
> > Hi everyone,
> >
> > I am using CMake to build some code cross-platform. This code requires
> > Boost Thread to compile. I am having several problems with FindBoost
> > on Windows.
> >
> > First, I installed Boost using BoostPro's precompiled binaries at
> > http://www.boostpro.com/download.
> >
> > Then I tried the following CMakeLists.txt file:
> >
> > --
> > # Simple CMake build file for testing FindBoost. Fails on Windows with
> > # Boost binaries from BoostPro computing (http://www.boostpro.com/).
> >
> > cmake_minimum_required(VERSION 2.6)
> >
> > project(boostFail1)
> >
> > message(STATUS "-- Boost:")
> > set(Boost_USE_STATIC_LIBS OFF)
> > set(Boost_USE_MULTITHREAD ON)
> >
> > find_package(Boost COMPONENTS thread REQUIRED)
> >
> > message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
> > message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
> > --
> >
> > The error message I see is:
> >
> > --
> > -- Boost:
> > CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/
> > FindBoost.cmake:868 (message):
> >   Unable to find the requested Boost libraries.
> >
> >   Boost version: 1.38.0
> >
> >   Boost include path: C:/Program Files/boost/boost_1_38
> >
> >   The following Boost libraries could not be found:
> >
> >   boost_thread
> >
> >   No Boost libraries were found.  You may need to set Boost_LIBRARYDIR
> > to the
> >   directory containing Boost libraries or BOOST_ROOT to the location of
> >   Boost.
> > Call Stack (most recent call first):
> >   CMakeLists.txt:16 (find_package)
> >
> >
> > Boost_INCLUDE_DIR: C:/Program Files/boost/boost_1_38
> > Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
> > --
> >
> > The problem does not occur on Linux or Mac OS X.
> >
> > I can work around the problem by calling find_package(Boost) with no
> > arguments, setting BOOST_ROOT accordingly, and then calling
> > "find_package(Boost COMPONENTS thread REQUIRED)" but it seems odd to
> > need to do that. Any thoughts?
> >
> > A full, working CMakeLists.txt for my project can be seen at:
> >
> >
> >
> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt
> >
> > Over half of the lines of code are specifically for dealing with
> > Boost, particularly on Windows; it would be nice to trim down the
> > configuration a bit.
> >
> > Thanks,
> > Curtis
> >
> > 
> >
> > ___
> > 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] Boost on Windows

2009-06-23 Thread Curtis Rueden
Hi Mike,


> I use the boost pre-compiled all the time and I don't have any of these
> issues BUT I do set the BOOST_ROOT environment variable in "My
> Computer->Advanced Settings" after I install which may be the difference. I
> use threads, program_options, testing, filesystem and system.
>

Yes, the problem is that I do not explicitly set BOOST_ROOT.

I did notice in the FindBoost that there is a subtle difference in how the
> directory names are generated:
>
> I think one has boost_1_38 while another has boost-1_38 depending on
> windows or unix.
>
> From FindBoost.cmake in CMake version 2.6.4 around line 460
>
>
> list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
> if(WIN32)
> # For BoostPro's underscores (and others?)
>  list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
> endif()
>

Interesting; I used the BoostPro installer so it is indeed all underscores
(boost_1_38).

Do you actually have the Dynamic multi-threaded boost libs installed?
>

Yep, I have all types (single threaded vs. multi-threaded, static vs.
shared) installed.


> Also, Looking at the CMakeLists.txt file it seems you are trying to parse
> the Boost_THREAD library variable for something? If you are trying to
> differentiate between the Release and Debug versions there are the following
> variables for each boost library.
>
> Boost_PROGRAM_OPTIONS_LIBRARY
> Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG
> Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE
>
> Any of that help?
>

Thanks, I didn't know about Boost_THREAD_LIBRARY_DEBUG. That helps me
eliminate a little bit of code.

Anyway, Arnaud Gelas and I took a look at FindBoost.cmake, and discovered
the problem. FIND_PATH is called to populate Boost_INCLUDE_DIR, but not
until line 478 (CMake 2.6-patch4), whereas the components are checked before
that (e.g., around line 303 there is an "IF(Boost_INCLUDE_DIR)" block that
never executes).

Andreas, shouldn't FIND_PATH be called right away, and once the
Boost_INCLUDE_DIR is known, then subsequently check for individual
components of Boost?

-Curtis

On Tue, Jun 23, 2009 at 2:21 PM, Michael Jackson <
mike.jack...@bluequartz.net> wrote:

> I use the boost pre-compiled all the time and I don't have any of these
> issues BUT I do set the BOOST_ROOT environment variable in "My
> Computer->Advanced Settings" after I install which may be the difference. I
> use threads, program_options, testing, filesystem and system.
>
> I did notice in the FindBoost that there is a subtle difference in how the
> directory names are generated:
>
> I think one has boost_1_38 while another has boost-1_38 depending on
> windows or unix.
>
> From FindBoost.cmake in CMake version 2.6.4 around line 460
>
>
> list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
> if(WIN32)
> # For BoostPro's underscores (and others?)
>  list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
> endif()
>
> Do you actually have the Dynamic multi-threaded boost libs installed?
>
> Also, Looking at the CMakeLists.txt file it seems you are trying to parse
> the Boost_THREAD library variable for something? If you are trying to
> differentiate between the Release and Debug versions there are the following
> variables for each boost library.
>
> Boost_PROGRAM_OPTIONS_LIBRARY
> Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG
> Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE
>
> Any of that help?
>
> _
> Mike Jackson  mike.jack...@bluequartz.net
> BlueQuartz Softwarewww.bluequartz.net
> Principal Software Engineer  Dayton, Ohio
>
>
>
>
> On Jun 23, 2009, at 1:35 PM, Curtis Rueden wrote:
>
>  Hi Andreas,
>>
>> Well, then most probably the layout of that binary installation differs
>> from what the FindBoost.cmake file expects. So where is the boost thread
>> library and how is it named?
>>
>> The latest available version of Boost offered by BoostPro is v1.38. The
>> libraries are placed in:
>>
>>  C:\Program Files\boost\boost_1_38\lib
>>
>> The strange thing is that FindBoost *does* find Boost, but only if first
>> run with no arguments, followed by explicitly setting BOOST_ROOT.
>>
>> Looking at this:
>>
>> >
>> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt
>>
>> The layout of that package seems to be utterly broken.
>>
>> Do you mean bf-cpp, or some other package? How is it "broken"? I am new to
>> the CMake way of doing things, so would appreciate any advice for
>> improvement.
>>
>> Thanks,
>> Curtis
>>
>> On Tue, Jun 23, 2009 at 1:26 PM, Andreas Pakulat  wrote:
>> On 23.06.09 13:09:25, Curtis Rueden wrote:
>> > First, I installed Boost using BoostPro's precompiled binaries at
>> > http://www.boostpro.com/download.
>> >
>> > Then I tried the following CMakeLists.txt file:
>> >
>> > --
>> > # Simple CMake build file for testing FindBoost. Fails on Windows with
>> > # Boost binaries from BoostPro comp

Re: [CMake] Boost on Windows

2009-06-23 Thread Christopher Harvey
define BOOST_ROOT and point it at the root install location for boost. I
had the same problem, that fixed it. I only had to do that on windows.

Curtis Rueden wrote:
> Hi everyone,
>
> I am using CMake to build some code cross-platform. This code requires
> Boost Thread to compile. I am having several problems with FindBoost
> on Windows.
>
> First, I installed Boost using BoostPro's precompiled binaries at
> http://www.boostpro.com/download.
>
> Then I tried the following CMakeLists.txt file:
>
> --
> # Simple CMake build file for testing FindBoost. Fails on Windows with
> # Boost binaries from BoostPro computing (http://www.boostpro.com/).
>
> cmake_minimum_required(VERSION 2.6)
>
> project(boostFail1)
>
> message(STATUS "-- Boost:")
> set(Boost_USE_STATIC_LIBS OFF)
> set(Boost_USE_MULTITHREAD ON)
>
> find_package(Boost COMPONENTS thread REQUIRED)
>
> message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
> message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
> --
>
> The error message I see is:
>
> --
> -- Boost:
> CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/
> FindBoost.cmake:868 (message):
>   Unable to find the requested Boost libraries.
>
>   Boost version: 1.38.0
>
>   Boost include path: C:/Program Files/boost/boost_1_38
>
>   The following Boost libraries could not be found:
>
>   boost_thread
>
>   No Boost libraries were found.  You may need to set Boost_LIBRARYDIR
> to the
>   directory containing Boost libraries or BOOST_ROOT to the location of
>   Boost.
> Call Stack (most recent call first):
>   CMakeLists.txt:16 (find_package)
>
>
> Boost_INCLUDE_DIR: C:/Program Files/boost/boost_1_38
> Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
> --
>
> The problem does not occur on Linux or Mac OS X.
>
> I can work around the problem by calling find_package(Boost) with no
> arguments, setting BOOST_ROOT accordingly, and then calling
> "find_package(Boost COMPONENTS thread REQUIRED)" but it seems odd to
> need to do that. Any thoughts?
>
> A full, working CMakeLists.txt for my project can be seen at:
>
>  
> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt
>
> Over half of the lines of code are specifically for dealing with
> Boost, particularly on Windows; it would be nice to trim down the
> configuration a bit.
>
> Thanks,
> Curtis
>
> 
>
> ___
> 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] Boost on Windows

2009-06-23 Thread Michael Jackson
I use the boost pre-compiled all the time and I don't have any of  
these issues BUT I do set the BOOST_ROOT environment variable in "My  
Computer->Advanced Settings" after I install which may be the  
difference. I use threads, program_options, testing, filesystem and  
system.


I did notice in the FindBoost that there is a subtle difference in how  
the directory names are generated:


I think one has boost_1_38 while another has boost-1_38 depending on  
windows or unix.


From FindBoost.cmake in CMake version 2.6.4 around line 460


list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
if(WIN32)
# For BoostPro's underscores (and others?)
  list(APPEND _boost_PATH_SUFFIXES "boost_$ 
{_boost_BOOSTIFIED_VERSION}")

endif()

Do you actually have the Dynamic multi-threaded boost libs installed?

Also, Looking at the CMakeLists.txt file it seems you are trying to  
parse the Boost_THREAD library variable for something? If you are  
trying to differentiate between the Release and Debug versions there  
are the following variables for each boost library.


Boost_PROGRAM_OPTIONS_LIBRARY
Boost_PROGRAM_OPTIONS_LIBRARY_DEBUG
Boost_PROGRAM_OPTIONS_LIBRARY_RELEASE

Any of that help?

_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio



On Jun 23, 2009, at 1:35 PM, Curtis Rueden wrote:


Hi Andreas,

Well, then most probably the layout of that binary installation  
differs
from what the FindBoost.cmake file expects. So where is the boost  
thread

library and how is it named?

The latest available version of Boost offered by BoostPro is v1.38.  
The libraries are placed in:


  C:\Program Files\boost\boost_1_38\lib

The strange thing is that FindBoost *does* find Boost, but only if  
first run with no arguments, followed by explicitly setting  
BOOST_ROOT.


Looking at this:

> 
https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt

The layout of that package seems to be utterly broken.

Do you mean bf-cpp, or some other package? How is it "broken"? I am  
new to the CMake way of doing things, so would appreciate any advice  
for improvement.


Thanks,
Curtis

On Tue, Jun 23, 2009 at 1:26 PM, Andreas Pakulat  wrote:
On 23.06.09 13:09:25, Curtis Rueden wrote:
> First, I installed Boost using BoostPro's precompiled binaries at
> http://www.boostpro.com/download.
>
> Then I tried the following CMakeLists.txt file:
>
> --
> # Simple CMake build file for testing FindBoost. Fails on Windows  
with

> # Boost binaries from BoostPro computing (http://www.boostpro.com/).
>
> cmake_minimum_required(VERSION 2.6)
>
> project(boostFail1)
>
> message(STATUS "-- Boost:")
> set(Boost_USE_STATIC_LIBS OFF)
> set(Boost_USE_MULTITHREAD ON)
>
> find_package(Boost COMPONENTS thread REQUIRED)
>
> message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
> message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
> --
>
> The error message I see is:
>
> --
> -- Boost:
> CMake Error at C:/Program Files/CMake
> 2.6/share/cmake-2.6/Modules/FindBoost.cmake:868 (message):
>   Unable to find the requested Boost libraries.
>
>   Boost version: 1.38.0
>
>   Boost include path: C:/Program Files/boost/boost_1_38
>
>   The following Boost libraries could not be found:
>
>   boost_thread
>
>   No Boost libraries were found.  You may need to set  
Boost_LIBRARYDIR to

> the
>   directory containing Boost libraries or BOOST_ROOT to the  
location of

>   Boost.
> Call Stack (most recent call first):
>   CMakeLists.txt:16 (find_package)
>
>
> Boost_INCLUDE_DIR: C:/Program Files/boost/boost_1_38
> Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
> --
>
> The problem does not occur on Linux or Mac OS X.

Well, then most probably the layout of that binary installation  
differs
from what the FindBoost.cmake file expects. So where is the boost  
thread

library and how is it named? Looking at this:

> 
https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt

The layout of that package seems to be utterly broken.

Andreas




___
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 on Windows

2009-06-23 Thread Curtis Rueden
Hi Andreas,

Well, then most probably the layout of that binary installation differs
> from what the FindBoost.cmake file expects. So where is the boost thread
> library and how is it named?


The latest available version of Boost offered by BoostPro is v1.38. The
libraries are placed in:

  C:\Program Files\boost\boost_1_38\lib

The strange thing is that FindBoost *does* find Boost, but only if first run
with no arguments, followed by explicitly setting BOOST_ROOT.

Looking at this:
>
>
>
> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt
>
> The layout of that package seems to be utterly broken.
>

Do you mean bf-cpp, or some other package? How is it "broken"? I am new to
the CMake way of doing things, so would appreciate any advice for
improvement.

Thanks,
Curtis

On Tue, Jun 23, 2009 at 1:26 PM, Andreas Pakulat  wrote:

> On 23.06.09 13:09:25, Curtis Rueden wrote:
> > First, I installed Boost using BoostPro's precompiled binaries at
> > http://www.boostpro.com/download.
> >
> > Then I tried the following CMakeLists.txt file:
> >
> > --
> > # Simple CMake build file for testing FindBoost. Fails on Windows with
> > # Boost binaries from BoostPro computing (http://www.boostpro.com/).
> >
> > cmake_minimum_required(VERSION 2.6)
> >
> > project(boostFail1)
> >
> > message(STATUS "-- Boost:")
> > set(Boost_USE_STATIC_LIBS OFF)
> > set(Boost_USE_MULTITHREAD ON)
> >
> > find_package(Boost COMPONENTS thread REQUIRED)
> >
> > message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
> > message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
> > --
> >
> > The error message I see is:
> >
> > --
> > -- Boost:
> > CMake Error at C:/Program Files/CMake
> > 2.6/share/cmake-2.6/Modules/FindBoost.cmake:868 (message):
> >   Unable to find the requested Boost libraries.
> >
> >   Boost version: 1.38.0
> >
> >   Boost include path: C:/Program Files/boost/boost_1_38
> >
> >   The following Boost libraries could not be found:
> >
> >   boost_thread
> >
> >   No Boost libraries were found.  You may need to set Boost_LIBRARYDIR to
> > the
> >   directory containing Boost libraries or BOOST_ROOT to the location of
> >   Boost.
> > Call Stack (most recent call first):
> >   CMakeLists.txt:16 (find_package)
> >
> >
> > Boost_INCLUDE_DIR: C:/Program Files/boost/boost_1_38
> > Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
> > --
> >
> > The problem does not occur on Linux or Mac OS X.
>
> Well, then most probably the layout of that binary installation differs
> from what the FindBoost.cmake file expects. So where is the boost thread
> library and how is it named? Looking at this:
>
> >
> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt
>
> The layout of that package seems to be utterly broken.
>
> Andreas
>
> --
> Caution: Keep out of reach of children.
> ___
> 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] Boost on Windows

2009-06-23 Thread Andreas Pakulat
On 23.06.09 13:09:25, Curtis Rueden wrote:
> First, I installed Boost using BoostPro's precompiled binaries at
> http://www.boostpro.com/download.
> 
> Then I tried the following CMakeLists.txt file:
> 
> --
> # Simple CMake build file for testing FindBoost. Fails on Windows with
> # Boost binaries from BoostPro computing (http://www.boostpro.com/).
> 
> cmake_minimum_required(VERSION 2.6)
> 
> project(boostFail1)
> 
> message(STATUS "-- Boost:")
> set(Boost_USE_STATIC_LIBS OFF)
> set(Boost_USE_MULTITHREAD ON)
> 
> find_package(Boost COMPONENTS thread REQUIRED)
> 
> message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
> message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
> --
> 
> The error message I see is:
> 
> --
> -- Boost:
> CMake Error at C:/Program Files/CMake
> 2.6/share/cmake-2.6/Modules/FindBoost.cmake:868 (message):
>   Unable to find the requested Boost libraries.
> 
>   Boost version: 1.38.0
> 
>   Boost include path: C:/Program Files/boost/boost_1_38
> 
>   The following Boost libraries could not be found:
> 
>   boost_thread
> 
>   No Boost libraries were found.  You may need to set Boost_LIBRARYDIR to
> the
>   directory containing Boost libraries or BOOST_ROOT to the location of
>   Boost.
> Call Stack (most recent call first):
>   CMakeLists.txt:16 (find_package)
> 
> 
> Boost_INCLUDE_DIR: C:/Program Files/boost/boost_1_38
> Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
> --
> 
> The problem does not occur on Linux or Mac OS X.

Well, then most probably the layout of that binary installation differs
from what the FindBoost.cmake file expects. So where is the boost thread
library and how is it named? Looking at this:
 
> https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt

The layout of that package seems to be utterly broken.

Andreas

-- 
Caution: Keep out of reach of children.
___
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 on Windows

2009-06-23 Thread Curtis Rueden
Hi everyone,

I am using CMake to build some code cross-platform. This code requires Boost
Thread to compile. I am having several problems with FindBoost on Windows.

First, I installed Boost using BoostPro's precompiled binaries at
http://www.boostpro.com/download.

Then I tried the following CMakeLists.txt file:

--
# Simple CMake build file for testing FindBoost. Fails on Windows with
# Boost binaries from BoostPro computing (http://www.boostpro.com/).

cmake_minimum_required(VERSION 2.6)

project(boostFail1)

message(STATUS "-- Boost:")
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREAD ON)

find_package(Boost COMPONENTS thread REQUIRED)

message(STATUS "Boost_INCLUDE_DIR: ${Boost_INCLUDE_DIR}")
message(STATUS "Boost_THREAD_LIBRARY : ${Boost_THREAD_LIBRARY}")
--

The error message I see is:

--
-- Boost:
CMake Error at C:/Program Files/CMake
2.6/share/cmake-2.6/Modules/FindBoost.cmake:868 (message):
  Unable to find the requested Boost libraries.

  Boost version: 1.38.0

  Boost include path: C:/Program Files/boost/boost_1_38

  The following Boost libraries could not be found:

  boost_thread

  No Boost libraries were found.  You may need to set Boost_LIBRARYDIR to
the
  directory containing Boost libraries or BOOST_ROOT to the location of
  Boost.
Call Stack (most recent call first):
  CMakeLists.txt:16 (find_package)


Boost_INCLUDE_DIR: C:/Program Files/boost/boost_1_38
Boost_THREAD_LIBRARY : Boost_THREAD_LIBRARY-NOTFOUND
--

The problem does not occur on Linux or Mac OS X.

I can work around the problem by calling find_package(Boost) with no
arguments, setting BOOST_ROOT accordingly, and then calling
"find_package(Boost COMPONENTS thread REQUIRED)" but it seems odd to need to
do that. Any thoughts?

A full, working CMakeLists.txt for my project can be seen at:


https://skyking.microscopy.wisc.edu/svn/java/trunk/components/native/bf-cpp/CMakeLists.txt

Over half of the lines of code are specifically for dealing with Boost,
particularly on Windows; it would be nice to trim down the configuration a
bit.

Thanks,
Curtis
___
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 system library

2009-03-19 Thread Philip Lowman
On Sun, Mar 15, 2009 at 12:03 PM, Bart Janssens
wrote:

> On Fri, Mar 13, 2009 at 1:13 PM, Geir Erikstad  wrote:
> > 09/3/13 Philip Lowman :
> >> I've logged a bug report for it here.  I'm pretty sure the best fix
> would be
> >> to get FindBoost to ignore the system component when it's detected a
> version
> >> less than 1.35.  I've attached a new FindBoost.cmake to the bug report
> which
> >> does this, if you could give it a shot?
> >>
> >> http://public.kitware.com/Bug/view.php?id=8734
>
> Thanks, I can confirm this works.


Thanks for testing, I merged it to CVS.  It should be in 2.6.4.

-- 
Philip Lowman
___
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 system library

2009-03-15 Thread Bart Janssens
On Fri, Mar 13, 2009 at 1:13 PM, Geir Erikstad  wrote:
> 09/3/13 Philip Lowman :
>> I've logged a bug report for it here.  I'm pretty sure the best fix would be
>> to get FindBoost to ignore the system component when it's detected a version
>> less than 1.35.  I've attached a new FindBoost.cmake to the bug report which
>> does this, if you could give it a shot?
>>
>> http://public.kitware.com/Bug/view.php?id=8734

Thanks, I can confirm this works.

> As an alternative to the "crappier workaround" you could run find_package 
> twice,
> first to get the version number, and then to get the modules you want:
>
> find_package(Boost)
> set(local_boost_version "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}")
> if (${local_boost_version} VERSION_LESS "1.35")
>    find_package(Boost COMPONENTS filesystem)
> else()
>    find_package(Boost COMPONENTS system filesystem)
> endif()

Thanks, I'll use this workaround until the patched FindBoost makes it
into a CMake release.

Cheers,

-- 
Bart
___
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 CMakeification progress?

2009-03-13 Thread John Biddiscombe




John 

Thanks for this info. The version I compiled from the boost-cmake svn
repository was 1.36 so I didn't realize that the main branch had it
included.

I'll give 1.38 a try.

JB


  

  Will standard releases of Boost
contain CMakeLists files in my lifetime?
  

They do already. 1.38.0 did. Although I did not have good success
building it that way.


  
  Here is a link to the release notes (look at the bottom of the page):

http://www.boost.org/users/download/version_1_38_0

  


-- 
John Biddiscombe,email:biddisco @ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91) 610.82.82



___
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 CMakeification progress?

2009-03-13 Thread John Drescher
On Fri, Mar 13, 2009 at 3:09 PM, John Drescher  wrote:
> On Fri, Mar 13, 2009 at 3:08 PM, John Drescher  wrote:
>>> Will standard releases of Boost
>>> contain CMakeLists files in my lifetime?
>>
>> They do already. 1.38.0 did. Although I did not have good success
>> building it that way.
>>
> Here is a link to the release notes (look at the bottom of the page):
>
> http://www.boost.org/users/download/version_1_38_0
>
Slight correction that is mentioned in Other Changes pretty much in
the middle of the page:


Other Changes

* Experimental support for building Boost with CMake has been
introduced in this version. For more details see the wiki, Discussion
is taking place on the Boost-cmake mailing list.
* Fixed subversion properties for several files. Most notably,
unix shell scripts should always have unix line endings, even in the
windows packages.

John
___
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 CMakeification progress?

2009-03-13 Thread John Drescher
On Fri, Mar 13, 2009 at 3:08 PM, John Drescher  wrote:
>> Will standard releases of Boost
>> contain CMakeLists files in my lifetime?
>
> They do already. 1.38.0 did. Although I did not have good success
> building it that way.
>
Here is a link to the release notes (look at the bottom of the page):

http://www.boost.org/users/download/version_1_38_0

John
___
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 CMakeification progress?

2009-03-13 Thread John Drescher
> Will standard releases of Boost
> contain CMakeLists files in my lifetime?

They do already. 1.38.0 did. Although I did not have good success
building it that way.

John
___
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 CMakeification progress?

2009-03-13 Thread Michael Jackson
I would ask on the boost-cmake mailing list. You will probably get  
good replies from notable people from the boost project.


_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio



On Mar 13, 2009, at 11:29 AM, John Biddiscombe wrote:

I just did an svn update of a very old boost-cmake folder and ran  
cmake. Everything built with no errors (Visual studio 2008) (lots of  
warnings, but no errors).


I wonder.

How well is CMakeification of Boost going? Will standard releases of  
Boost contain CMakeLists files in my lifetime? and if so, how much  
of a dream is it to be able to CPack portions of boost (individual  
libraries + dependencies) up for redistribution within other  
projects that use only subsets of boost - and to be able to point my  
CMakeLists to a 'UseBoost' cmake config file?


Thanks - (and apologies if posting this question on the cmake list  
instead of boot or boost-cmake lists)


JB

--

John Biddiscombe,email:biddisco @ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91) 610.82.82


___
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


[CMake] Boost CMakeification progress?

2009-03-13 Thread John Biddiscombe
I just did an svn update of a very old boost-cmake folder and ran cmake. 
Everything built with no errors (Visual studio 2008) (lots of warnings, 
but no errors).


I wonder.

How well is CMakeification of Boost going? Will standard releases of 
Boost contain CMakeLists files in my lifetime? and if so, how much of a 
dream is it to be able to CPack portions of boost (individual libraries 
+ dependencies) up for redistribution within other projects that use 
only subsets of boost - and to be able to point my CMakeLists to a 
'UseBoost' cmake config file?


Thanks - (and apologies if posting this question on the cmake list 
instead of boot or boost-cmake lists)


JB

--

John Biddiscombe,email:biddisco @ cscs.ch
http://www.cscs.ch/
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91) 610.82.82


___
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 system library

2009-03-13 Thread Geir Erikstad
09/3/13 Philip Lowman :
> On Thu, Mar 12, 2009 at 7:39 PM, Bart Janssens 
> wrote:
>>
>> Not sure if this ever came up, but I'm struggling with FindBoost and
>> the boost system library. The system library is required from boost
>> 1.35 onwards, but doesn't exist in earlier versions. Is there a way to
>> make CMake only look for the system library if the boost version is
>> greater than or equal to 1.35? I'm using CMake 2.6.1.
>
> I've never seen this come up before but you do have a good point about the
> System library refactoring causing some people a bit of heartache here.
>
> I've logged a bug report for it here.  I'm pretty sure the best fix would be
> to get FindBoost to ignore the system component when it's detected a version
> less than 1.35.  I've attached a new FindBoost.cmake to the bug report which
> does this, if you could give it a shot?
>
> http://public.kitware.com/Bug/view.php?id=8734
>
>
> P.S.
>
> A crappier workaround might be to do something like this.  This probably
> will fail initially and the user could toggle the option and I think it
> would start working on the second configure... kinda sucky though.
>
> OPTION(I_AM_USING_OLDER_BOOST "Set to true if using Boost 1.35" OFF)
> IF(I_AM_USING_OLDER_BOOST)
>    find_package(Boost 1.30 REQUIRED filesystem)
> ELSE()
>    find_package(Boost 1.35 REQUIRED filesystem system)
> ENDIF()
>
> There might be other ways of faking out FindBoost as well by poking around
> with advanced cache variables it relies upon.
>
> --
> Philip Lowman
>

As an alternative to the "crappier workaround" you could run find_package twice,
first to get the version number, and then to get the modules you want:

find_package(Boost)
set(local_boost_version "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}")
if (${local_boost_version} VERSION_LESS "1.35")
find_package(Boost COMPONENTS filesystem)
else()
find_package(Boost COMPONENTS system filesystem)
endif()

---
-geirr
___
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 system library

2009-03-12 Thread Philip Lowman
On Thu, Mar 12, 2009 at 7:39 PM, Bart Janssens wrote:

> Not sure if this ever came up, but I'm struggling with FindBoost and
> the boost system library. The system library is required from boost
> 1.35 onwards, but doesn't exist in earlier versions. Is there a way to
> make CMake only look for the system library if the boost version is
> greater than or equal to 1.35? I'm using CMake 2.6.1.


I've never seen this come up before but you do have a good point about the
System library refactoring causing some people a bit of heartache here.

I've logged a bug report for it here.  I'm pretty sure the best fix would be
to get FindBoost to ignore the system component when it's detected a version
less than 1.35.  I've attached a new FindBoost.cmake to the bug report which
does this, if you could give it a shot?

http://public.kitware.com/Bug/view.php?id=8734




P.S.

A crappier workaround might be to do something like this.  This probably
will fail initially and the user could toggle the option and I think it
would start working on the second configure... kinda sucky though.

OPTION(I_AM_USING_OLDER_BOOST "Set to true if using Boost 1.35" OFF)
IF(I_AM_USING_OLDER_BOOST)
   find_package(Boost 1.30 REQUIRED filesystem)
ELSE()
   find_package(Boost 1.35 REQUIRED filesystem system)
ENDIF()

There might be other ways of faking out FindBoost as well by poking around
with advanced cache variables it relies upon.

-- 
Philip Lowman
___
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 system library

2009-03-12 Thread Bart Janssens
Hi all,

Not sure if this ever came up, but I'm struggling with FindBoost and
the boost system library. The system library is required from boost
1.35 onwards, but doesn't exist in earlier versions. Is there a way to
make CMake only look for the system library if the boost version is
greater than or equal to 1.35? I'm using CMake 2.6.1.

Cheers,

-- 
Bart Janssens
___
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 component names

2008-11-06 Thread Michael Jackson
uBLAS is part of the 'numeric' library and is NOT a compiled library  
so just having the boost headers installed correctly is enough.



On Nov 6, 2008, at 4:56 PM, Christopher Harvey wrote:


Hi list,
Sometimes when using the FindBoost.cmake package I have a very hard  
time figuring out what valid names for the components list are.  
Normally I just do a google code search but now I can't find what  
I'm looking for. I'd like to check to make sure that the boost uBLAS  
library is installed.


http://www.boost.org/doc/libs/1_36_0/libs/numeric/ublas/doc/index.htm

If anybody knows the ublas component name I'd appreciate it.
Or even better:
how to figure out what the component name for any boost library is.

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


_
Mike Jackson  [EMAIL PROTECTED]
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio



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


Re: [CMake] boost component names

2008-11-06 Thread Andreas Pakulat
On 06.11.08 16:56:52, Christopher Harvey wrote:
> Hi list,
> Sometimes when using the FindBoost.cmake package I have a very hard time  
> figuring out what valid names for the components list are. Normally I  
> just do a google code search but now I can't find what I'm looking for.  
> I'd like to check to make sure that the boost uBLAS library is installed.

Its actually quite easy: Look at the lib/ directory of your boost
installation. There you'll find files such as libboost_date_time-gcc
now from this filename remove libboost_ and anything from (including) -gcc
til the end. Now you have your component name. So for the example the
component name is "date_time". Thats how FindBoost.cmake works, it simply
puts together the library name from
boost_

Andreas

-- 
You will gain money by an immoral action.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] boost component names

2008-11-06 Thread Christopher Harvey

Hi list,
Sometimes when using the FindBoost.cmake package I have a very hard time 
figuring out what valid names for the components list are. Normally I 
just do a google code search but now I can't find what I'm looking for. 
I'd like to check to make sure that the boost uBLAS library is installed.


http://www.boost.org/doc/libs/1_36_0/libs/numeric/ublas/doc/index.htm

If anybody knows the ublas component name I'd appreciate it.
Or even better:
how to figure out what the component name for any boost library is.

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


Re: [CMake] Boost Trunk is getting CMake support

2008-11-02 Thread Michael Jackson

FIXED..

Thanks for the feedback

Mike
On Nov 2, 2008, at 3:49 AM, Maik Beckmann wrote:


2008/11/1 Michael Jackson <[EMAIL PROTECTED]>:

Hi Michael,

If you want to have a look try reading the following wiki page for  
more

details:

https://svn.boost.org/trac/boost/wiki/CMakeConfigAndBuild


There the statement
{{{
svn co http://svn.boost.org/svn/boost $BOOST/src
}}}
will check out the _hole_ repository into $BOOST/src. See
{{{
$ svn list http://svn.boost.org/svn/boost
branches/
empty/
sandbox/
sandbox-branches/
sandbox-tags/
svnmanager/
tags/
trunk/
website/
}}}
I doubt this is intended.

The right statement to get the trunk is
{{{
svn co http://svn.boost.org/svn/boost/trunk $BOOST/src
}}}


Best,
-- Maik




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


Re: [CMake] Boost Trunk is getting CMake support

2008-11-02 Thread Vladimir Prus
Daniel Stonier wrote:

> 2008/11/2 Esben Mose Hansen <[EMAIL PROTECTED]>:
>> On Saturday 01 November 2008 20:16:42 Michael Jackson wrote:
>>> Just wanted to let the cmake community know that very early CMake
>>> support has been added to the Boost trunk. Currently only some of the
>>
>> That is great news! Occasionally I struggle to cross-compile Boost, and
>> this should make it a lot easier.
>>
> 
> I'll second that! I can cross-compile, but its never easy and I
> usually dont fully understand the process.

It should be noted that:

- linux->linux cross compile with Boost.Build generally just works
- linux->windows cross support was recently completed
- windows->linux cross should be fixed by Monday
- complete documentation is coming soon

So, you don't really need CMake for that.

- Volodya


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


Re: [CMake] Boost Trunk is getting CMake support

2008-11-02 Thread Daniel Stonier
2008/11/2 Esben Mose Hansen <[EMAIL PROTECTED]>:
> On Saturday 01 November 2008 20:16:42 Michael Jackson wrote:
>> Just wanted to let the cmake community know that very early CMake
>> support has been added to the Boost trunk. Currently only some of the
>
> That is great news! Occasionally I struggle to cross-compile Boost, and
> this should make it a lot easier.
>

I'll second that! I can cross-compile, but its never easy and I
usually dont fully understand the process.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


  1   2   >