Skip to content

FindBoost: pick up _boost_ARCHITECTURE_TAG from CMAKE_LIBRARY_ARCHITECTURE

Anton Kryukov requested to merge akryuk/cmake:master into master

I tried to build my project with boost 1.66 (built by b2 with G++-7 using --layout=versioned) on Ubuntu 14.04, but FindBoost.cmake could not find the libraries because of the architecture tag. That's because the CMAKE_CXX_COMPILER_ARCHITECTURE_ID variable is not set for this compiler. I modified FindBoost to try CMAKE_LIBRARY_ARCHITECTURE and it worked for me. CMAKE_LIBRARY_ARCHITECTURE does not seem to be set for Visual C++, so this is not a replacement for CMAKE_CXX_COMPILER_ARCHITECTURE_ID. I don't have easy access to other compilers/platforms.

Fixes: #17701

Edited by Brad King

Merge request reports