Getting CMake on Windows to find the vc120 Boost libraries -


cmake looking different boost files have installed, , don't know how fix it. i'm on 64-bit windows 7, visualstudio community 2015, , using latest 64-bit build of boost boost_1_58_0-msvc-12.0-64.exe.

the relevant part of cmake file this:

set          ( boost_debug                on  ) set          ( boost_detailed_failure_msg on  ) set          ( boost_use_static_libs      on  ) set          ( boost_use_multithreaded    on  ) set          ( boost_use_static_runtime   off ) find_package ( boost components regex date_time required ) 

with debug , detailed messages enabled, can see cmake looking in right place, looking "vc140" instead of "vc120":

location of version.hpp: c:/boost_1_58_0/boost/version.hpp version.hpp reveals boost 1.58.0 guessed _boost_compiler = -vc140 _boost_multithreaded = -mt _boost_release_abi_tag = - _boost_debug_abi_tag = -gd _boost_library_search_dirs = c:\boost_1_58_0\lib64-msvc-12.0;c:\boost_1_58_0/lib;c:\boost_1_58_0/stage/lib;c:/boost_1_58_0/lib;c:/boost_1_58_0/../lib;c:/boost_1_58_0/stage/lib;paths;c:/boost/lib;c:/boost;/sw/local/lib searching regex_library_release: libboost_regex-vc140-mt-1_58; libboost_regex-vc140-mt; libboost_regex-mt-1_58; libboost_regex-mt; libboost_regex 

the files have named "120":

>dir /b c:\boost_1_58_0\lib64-msvc-12.0\libboost_regex-* libboost_regex-vc120-mt-1_58.lib libboost_regex-vc120-mt-gd-1_58.lib libboost_regex-vc120-mt-s-1_58.lib libboost_regex-vc120-mt-sgd-1_58.lib libboost_regex-vc120-s-1_58.lib libboost_regex-vc120-sgd-1_58.lib 

i'm assuming "120" refers version of visualstudio? how cmake find vc120 files?

little known variable called boost_compiler solution. in case, force cmake vc120 instead of default vc140, have run cmake this:

>cmake -dcmake_build_type=release -dboost_compiler=-vc120 -dboost_root=c:\boost_1_58_0 -dboost_librarydir=c:\boost_1_58_0\lib64-msvc-12.0 -g "visual studio 14" .. 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -