Hi,

I know the version layout of Boost build is preferred or
even specific to Windows, but I like it in general, ie. on Linux.
It lazily allows me to get everything built with single command:

b2 variant=debug,release address-model=32,64 --layout=versioned stage

The versioned layout impose some challenges while find_package-ing
at least I've experienced it using FindBoost.cmake from latest CMake 3.12.

For example, running CMake in Linux environment with GCC 5.5.0 for

find_package(Boost 1.65.0 REQUIRED COMPONENTS system)

will attempt to search for

...
-- [ /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1420 ]
guessed _boost_COMPILER = -gcc55
...
-- [ /usr/local/share/cmake-3.12/Modules/FindBoost.cmake:1760 ]
Searching for SYSTEM_LIBRARY_RELEASE:
boost_system-gcc55-mt-1_69;boost_system-gcc55-mt;boost_system-mt-1_69;boost_system-mt;boost_system
...

The issue is that b2  generated names like

libboost_system-gcc5-mt-d-x64-1_69.a

So, I had to bend CMake this way to find Boost for me:

cmake -DBoost_COMPILER=-gcc5 -DCMAKE_CXX_COMPILER_ARCHITECTURE_ID=x64 ..

I'm not asking any specific questions here.
I just thought that might be helpful to other users of FindBoost.cmake.

Best regards,
-- 
Mateusz Loskot, http://mateusz.loskot.net
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to