Compiler selection and customizing a build
Selecting a specific compiler
Meson supports the standard environment variables CC, CXX and FC to
select specific C, C++ and/or Fortran compilers. These environment variables are
documented in the reference tables in the Meson docs.
Note that environment variables only get applied from a clean build, because
they affect the configure stage (i.e., meson setup). An incremental rebuild
does not react to changes in environment variables - you have to run git
clean -xdf and do a full rebuild, or run meson .