FindBoost can't find boost libraries due to wrong guessed compiler on Windows
Currently, it looks like FindBoost guesses the compiler by looking at the generator used (https://github.com/Kitware/CMake/blob/master/Modules/FindBoost.cmake#L1266-L1276). However, the users' Boost libraries could have been compiled with any other compiler, not the same as CMake knows about. This is a problem for Visual Studio. For example, I have VS110 installed on my system and FindBoost reports that the guessed
_boost_COMPILER is VC110. But, my Boost binaries seem to be compiled with VC90, so the library names are in form of
boost_<component>-vc90-*.lib. As a result the libraries can't be found even though the include directory is found, and so the version number. Per suggestion in the related code snippet referenced above, I am reporting this issue. Also, as suggested in the code snippet, I set
Boost_COMPILER to "-vc90" and CMake found the library.