Philip,

 

You closed the bug already so I can't comment there, but I wanted to let you 
know that this latest version of FindBoost.cmake did work as expected for me.  
Thank you so much for your help.

 

--

Shane

 

________________________________

From: philiplow...@gmail.com [mailto:philiplow...@gmail.com] On Behalf Of 
Philip Lowman
Sent: Tuesday, September 07, 2010 10:15 PM
To: Dixon, Shane
Cc: cmake@cmake.org
Subject: Re: [CMake] FindBoost.cmake trouble with static libs (-gd vs -sgd 
issue)

 

Shane,

Thanks for opening ticket 11204 for this issue.  My response is included there.

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

 

On Thu, Sep 2, 2010 at 4:08 PM, Dixon, Shane <shane.di...@atmel.com> wrote:

I found that when using the FindBoost.cmake and using the Boost_USE_STATIC_LIBS 
option, it wouldn't find the static libs in my C:\Boost\libs folder.  It kept 
coming back with files ending in -gd libs instead of -sgd libs even though the 
option Boost_USE_STATIC_LIBS was set.  I found that it had to do with the order 
that the FIND_LIBRARY looks for the files.  I had BOTH the -gd and the -sgd 
libraries installed so it found the -gd ones first and then ignores the next 
option.  I fixed it by applying the following:

 

 

728,729c728,729

<         NAMES  
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}

<                
${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}

---

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

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

 

I just switched the order to look for the more specific lib before the more 
general one.  If ${_boost_STATIC_TAG} is empty when Boost_USE_STATIC_LIBS is 
OFF, then maybe this could just be one line:

 

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

 

Which seems like it should find either -sgd or -gd files, but sould find -sgd 
files first if the option was provided.  Any thoughts?  I defer to anyone with 
more experience for the best way to do this.

 

--

Shane


_______________________________________________
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




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

Reply via email to