I'm on Archx64 with bspwm as WM. I have both gcc and clang installed and updated to latest versions. I want build systems to ask me everytime to choose either g++ or clang ++ to compile.
I need clang++ as default compiler for my own stuff , but I have cmake that usually chooses compilers on its own. So I exported
CXX as clang and clang++ in
.bashrc . Everything runs fine as expected, but the problem arises when I need to compile something with g++ and the program looks for
/usr/bin/c++ and finds clang++ instead of g++. I need , everytime some program tries to compile its stuff , it could ask me beforehand , which compiler to use. Is it possible?
My current method is to export each time and restart my machine :p which is insane amounts of stupidity.