[CMake] Boost 1.70.0 -- FindBoost issues? No linker libraries found

Andrew Maclean andrew.amaclean at gmail.com
Mon Apr 15 19:01:12 EDT 2019


Has anyone else got issues using Boost 1.70 in their code.
I'm using CMake 3.14.2
I have done the usual build/install of Boost in linux and everything seems
to be installed Ok in /usr/local/include and /usr/local lib.
The problem is the no linker libraries are being found.

I use this in my CMakeLists.txt fle:
#----
find_package(Boost *1.70.0 *EXACT REQUIRED COMPONENTS
  date_time  filesystem  regex  serialization  system  thread  iostreams
)
#---
I reinstalled Boost 1.69 and changed to *1.69.0* in find_package and
everything builds OK.
*Boost 1.69*
When using 1.69 in CMakeLists.txt file I get expected entries like:
//Boost date_time library (debug)
Boost_DATE_TIME_LIBRARY_DEBUG:FILEPATH=/usr/local/lib/libboost_date_time.so

 In build.ninja all the requested linker libraries are there e.g.
/usr/local/lib/libboost_date_time.so

*Boost 1.70*
When using Boost 1.70 all I get in the CMakeLists.txt file are entries like:
//The directory containing a CMake configuration file for boost_date_time.
boost_date_time_DIR:PATH=/usr/local/lib/cmake/boost_date_time-1.70.0

In build.ninja no linker libraries are listed.

Everything seems in order in /usr/local/lib:
--------------------------------------
-rw-r--r-- 1 root root 160618 Apr 16 07:46 libboost_date_time.a
lrwxrwxrwx 1 root root     28 Apr 16 08:08 libboost_date_time.so ->
libboost_date_t
ime.so.1.70.0

lrwxrwxrwx 1 root root     28 Apr 16 08:08 libboost_date_time.so.1 ->
libboost_date
_time.so.1.70.0

-rwxr-xr-x 1 root root 103672 Apr 16 07:47 libboost_date_time.so.1.69.0
lrwxrwxrwx 1 root root     28 Apr 16 08:08 libboost_date_time.so.1.70 ->
libboost_d
ate_time.so.1.70.0

-rwxr-xr-x 1 root root 103672 Apr 16 08:08 libboost_date_time.so.1.70.0
---------------------------

It is also not possible to build in Windows using VS2019 and Boost 1.70.

Regards
   Andrew

-- 
___________________________________________
Andrew J. P. Maclean

___________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20190416/8b348981/attachment.html>


More information about the CMake mailing list