[CMake] cmake 2.6.4 won't find boost 1.40 on windows
Cristian Adam
cristian.adam at gmx.net
Thu Sep 17 16:48:14 EDT 2009
Hi,
I have encountered problems with Boost 1.40 (build on Windows using
Visual Studio 2008 and MinGW GCC 4.4.0) with CMake 2.6.4.
Boost was compiled for Visual Studio 2008 like this:
bjam --build-dir=c:\temp\boost toolset=msvc --build-type=complete install
and for MinGW GCC like this:
bjam --build-dir=c:\temp\boost toolset=gcc --build-type=complete install
Adding set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0") didn't fix the
problem.
The problem is due to the fact that Boost 1.40 was installed to
c:\boost\include\boost-1_40\ and according to FindBoost.cmake module
lines 292 to 300:
FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
# Add in a path suffix, based on the required version, ideally
# we could read this from version.hpp, but for that to work we'd
# need to know the include dir already
if (WIN32 AND NOT CYGWIN)
set(_boost_PATH_SUFFIX boost_${_boost_VER})
else (WIN32 AND NOT CYGWIN)
set(_boost_PATH_SUFFIX boost-${_boost_VER})
endif (WIN32 AND NOT CYGWIN)
Boost should have been installed into c:\boost\include\boost_1_40\.
Was Boost before version 1.40 installed into "boost_1_3x" for Visual
Studio and MinGW?
If so how should version 1.40 be detected for Visual Studio and MinGW?
I have tested two solutions to this problem:
1. rename c:\boost\include\boost-1_40\ to c:\boost\include\boost_1_40\
2. use set(BOOST_INCLUDEDIR "c:/boost/include/boost-1_40"
The following cmake change:
http://www.cmake.org/pipermail/cmake-commits/2009-August/006975.html
will remove the "set(Boost_ADDITIONAL_VERSIONS "1.40" "1.40.0")"
statement but it won't fix the
underscore problem for Visual Studio and MinGW Boost compilations!
Cheers,
Cristian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090917/3280a596/attachment.htm>
More information about the CMake
mailing list