<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font size="-1"><font face="Helvetica, Arial, sans-serif">Hi,<br>
<br>
I have encountered problems with Boost 1.40 (build on Windows using<br>
Visual Studio 2008 and MinGW GCC 4.4.0) with CMake 2.6.4.<br>
<br>
Boost was compiled for Visual Studio 2008 like this:<br>
bjam --build-dir=c:\temp\boost toolset=msvc --build-type=complete
install<br>
and for MinGW GCC like this:<br>
bjam --build-dir=c:\temp\boost toolset=gcc --build-type=complete install<br>
<br>
Adding set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0") didn't fix the<br>
problem.<br>
<br>
The problem is due to the fact that Boost 1.40 was installed to<br>
c:\boost\include\boost-1_40\ and according to FindBoost.cmake module
lines 292 to 300:<br>
<br>
FOREACH(_boost_VER ${_boost_TEST_VERSIONS})<br>
# Add in a path suffix, based on the required version, ideally<br>
# we could read this from version.hpp, but for that to work we'd<br>
# need to know the include dir already<br>
if (WIN32 AND NOT CYGWIN)<br>
set(_boost_PATH_SUFFIX boost_${_boost_VER})<br>
else (WIN32 AND NOT CYGWIN)<br>
set(_boost_PATH_SUFFIX boost-${_boost_VER})<br>
endif (WIN32 AND NOT CYGWIN)<br>
<br>
Boost should have been installed into c:\boost\include\boost_1_40\.<br>
<br>
Was Boost before version 1.40 installed into "boost_1_3x" for Visual
Studio and MinGW? <br>
If so how should version 1.40 be detected for Visual Studio and MinGW?<br>
<br>
I have tested two solutions to this problem:<br>
<br>
1. rename c:\boost\include\boost-1_40\ to c:\boost\include\boost_1_40\<br>
2. use set(BOOST_INCLUDEDIR "c:/boost/include/boost-1_40"<br>
<br>
The following cmake change:<br>
<a class="moz-txt-link-freetext" href="http://www.cmake.org/pipermail/cmake-commits/2009-August/006975.html">http://www.cmake.org/pipermail/cmake-commits/2009-August/006975.html</a><br>
will remove the "set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0")"
statement but it won't fix the <br>
underscore problem for Visual Studio and MinGW Boost compilations!<br>
<br>
Cheers,<br>
Cristian.</font></font>
</body>
</html>