4

I'm trying to follow the instructions on OpenMP®/Clang to enable openmp in Xcode. But Add a new user-defined setting CC with the value /usr/local/bin/clang-omp confuses me. I tried to change the Build Settings->Build Options-> Compilers for C/C++/Objective-C to /usr/local/bin/clang-omp++, but I got Unsupported Compiler error.

Please help, thanks ahead.

2

1 Answer 1

1

You should be able to set some user build settings to choose your compiler. You can set special build settings from the command line using the following syntax.

xcodebuild build FOO=bla 

Disclaimer: some of those build settings are undocumented (afaik). Use at your own risk.

Here are a few build settings that I found useful to inject C flags:

  • OTHER_CFLAGS
  • OTHER_CPLUSPLUSFLAGS

or to replace the compiler(s) and linker(s):

  • CC
  • CPLUSPLUS
  • LD
  • LDPLUSPLUS
  • LIBTOOL

The same approach works to control the "analyze" action:

  • CLANG_ANALYZER_EXEC
  • CLANG_ANALYZER_OTHER_FLAGS

Sourced from cfe-dev mailing list

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.