CMake Specify Compiler
CMake Specify Compiler
cmake -DCMAKE_C_COMPILER:FILEPATH=/path/to/gcc-11 -DCMAKE_CXX_COMPILER:FILEPATH=/path/to/g++-11 ..export CC=/path/to/gcc-11export CXX=/path/to/gcc-11make <target>
Note:
CMAKE_C_COMPILERshould not be set inCMakeListswithsetinstead we pass it as an argument and get it checked inCMakeCache