<div class="gmail_quote">On Sat, Apr 18, 2009 at 9:14 AM, Nadir SOUALEM <span dir="ltr"><<a href="mailto:nadir.soualem@irisa.fr">nadir.soualem@irisa.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi !!!<br>
Is there a way to avoid using TOUPPER<br>
<br>
SET(BOOST_ROOT $ENV{WORK}/../build/boost_1_34_1)<br>
SET(Boost_USE_MULTITHREAD ON)<br>
FIND_PACKAGE(Boost 1.34.1 COMPONENTS date_time filesystem)<br>
STRING(TOUPPER ${CMAKE_BUILD_TYPE} UPPER_CMAKE_BUILD_TYPE)<br>
Message (lib= ${Boost_DATE_TIME_LIBRARY_${UPPER_CMAKE_BUILD_TYPE}} )<br>
<br>
I would like for example to use in debug mode, but CMAKE_BUILD_TYPE=Debug(documentation) not DEBUG<br>
and FindBoost use DEBUG (upperCase) (DEBUG different of Debug in Unix case)</blockquote><div><br>Use Boost_${COMPONENT}_LIBRARY instead.<br><br>This will include the "debug" and "optimized" keywords if both Boost_${COMPONENT}_LIBRARY_DEBUG and Boost_${COMPONENT}_LIBRARY_RELEASE are found.<br>
<br>You probably don't want to use CMAKE_BUILD_TYPE directly for this because the debug libraries for boost aren't always readily available on non-Windows platforms. Also you may want to build with RelWithDebInfo or some other build configuration in the future in which case the library would not be found.<br>
<br>The documentation in the latest FindBoost no longer even mentions the _DEBUG and _RELEASE variables and advises people to use either Boost_LIBRARIES or Boost_${COMPONENT}_LIBRARY<br><br><pre># For each component you specify in find_package(), the following (UPPER-CASE)<br>
# variables are set. You can use these variables if you would like to pick and<br># choose components for your targets instead of just using Boost_LIBRARIES.<br>#<br># Boost_${COMPONENT}_FOUND True IF the Boost library "component" was found.<br>
#<br># Boost_${COMPONENT}_LIBRARY Contains the libraries for the specified Boost<br># "component" (includes debug and optimized keywords<br># when needed).<br>
</pre></div></div><br>-- <br>Philip Lowman<br>