Fix "clang: error: unsupported option '-fopenmp'" when building from source

471 Views Asked by At

I am currently working on something for which I need to use an application that I can only build from source (namely the MiBS solver)

When I do as described in the provided readme, I encounter this clang: error: unsupported option '-fopenmp' make[1]: *** [Master/main.o] Error 1 make: *** [all-recursive] Error 1

I have read alot and found threads like this one, in which it is advised to use brew install llvm libompand then use

/usr/local/opt/llvm/bin/clang -fopenmp -L/usr/local/opt/llvm/lib omp_ProgramName.c -o ProgramName

My struggle with that is, I am not directly executing the compilation commands myself, rather they are hidden within the downloaded source.

I also tried brew install llvm libomp; export CC=/usr/local/opt/llvm/bin/clang and then restarted my computer, as suggested in multiple threads.

That did not do anything.

Is there a way for me to leave the source code as is and just update clang or anything similar?

Thanks in advance and have a nice day! Leon

0

There are 0 best solutions below