set the compiler for each build: set(COMPILER /opt/gcc/bin) cmake_force_c_compiler( "${COMPILER}gcc" GNU) cmake_force_cxx_compiler("${COMPILER}g++" GNU) -- Sent from: http://cmake.3232098.n2.nabble.com/