[CMake] cmake needs 2 runs to find boost
Peter Steinbach
steinbach at scionics.de
Tue Nov 3 08:10:54 EST 2015
Hi to all,
I tested this with cmake 3.2.2 and 3.3.2 and still get the same problem.
I'd like to use boost with gcc on windows 7 64bit. I installed boost and gcc
with msys2 as I cannot use MSVC for the actual project I am looking into for
this.
the funny thing, if I use the attached CMakeLists.txt on the machine and call:
```
$ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 -
DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib ..
-- The CXX compiler identification is GNU 4.9.2
-- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe
-- Check for working CXX compiler: C:/msys64/usr/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
setting win specific stuff
CMake Error at C:/Program Files
(x86)/CMake/share/cmake-3.2/Modules/FindBoost.cmake:1182 (message):
Unable to find the requested Boost libraries.
Boost version: 1.57.0
Boost include path: C:/msys64/mingw64/include
Could not find the following static Boost libraries:
boost_filesystem
boost_system
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:17 (FIND_PACKAGE)
CMake Error at CMakeLists.txt:24 (MESSAGE):
Boost not found (C:/msys64/mingw64)
-- Configuring incomplete, errors occurred!
See also
"C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build/CMakeFiles/CMakeOutput.log".
$ cmake -G "MSYS Makefiles" -DBOOST_ROOT=C:/msys64/mingw64 -
DBOOST_LIBRARYDIR==C:/msys64/mingw64/lib ..
setting win specific stuff
Boost 1.57 found __
-- Configuring done
-- Generating done
-- Build files have been written to:
C:/msys64/home/steinbac/development/cmake_sandbox/find_boost/build
```
I'd like to link statically to multithreaded libboost_*-mt.a from my app. But
it proofes really hard to find Boost in the first place.
Any ideas?
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CMakeLists.txt
Type: text/x-cmake
Size: 782 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/cmake/attachments/20151103/a453c48f/attachment.bin>
More information about the CMake
mailing list