The compiler needs to be set for all non cmake projects, as they do not use the cmake build variables. Links for Boost: - https://www.boost.org/doc/libs/1_53_0/libs/config/doc/html/index.html#boost_config.configuring_boost_for_your_platform.using_the_configure_script - https://stackoverflow.com/questions/21047399/cmake-set-environment-variables-from-a-script - https://gitlab.kitware.com/cmake/cmake/issues/17536