Use correct GCC installation when installing clang with GCC (#12381)

This commit is contained in:
Seth R. Johnson 2019-08-11 13:40:12 -04:00 committed by Adam J. Stewart
parent 5532b8e617
commit 52a737affe

View File

@ -697,6 +697,10 @@ def cmake_args(self):
if '+omp_tsan' in spec:
cmake_args.append('-DLIBOMP_TSAN_SUPPORT=ON')
if self.compiler.name == 'gcc':
gcc_prefix = ancestor(self.compiler.cc, 2)
cmake_args.append('-DGCC_INSTALL_PREFIX=' + gcc_prefix)
if spec.satisfies('@4.0.0:') and spec.satisfies('platform=linux'):
cmake_args.append('-DCMAKE_BUILD_WITH_INSTALL_RPATH=1')
return cmake_args