On Sat, Nov 05, 2022, Vlad Cojocaru via AMBER wrote:
>
>Does anyone have any idea how to stop cmake from using the default gcc
>version ?
Scott's solution is the elegant one. But here's the alternative I use: I
allow cmake to use the default gcc, but make sure the compilers in my PATH
are the ones I want to use.
As an example, I create a /home/case/gcc11bin folder with three entries:
gcc, g++ and gfortran. Each of these points to the compiler I want, e.g.
ln -s /usr/bin/gcc-11 gcc
ln -s /usr/bin/g++-11 g++
ln -s /usr/bin/gfortran-11 gfortran
Then, *for just the session when I compile Amber*, I do this:
export PATH=/home/case/gcc11bin:$PATH
I can then run cmake with no extra flags.
....dac
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Sat Nov 05 2022 - 08:00:02 PDT