I have been working on a mac with XCode for 2 months now and I’d like to be able to use CLang 3.1 because of C++11 features that would help me a lot writing less verbose code.
I am not a unix/bsd-like massive user so I lack a lot of knowledge about how to connect things in my work environnement.
Here are some questions:
are there official plans or release date for Apple to upgrade XCode to Clang 3.1 once it’s released? I assume that NO because I couldn’t find anything online.
assuming that I get clang 3.1 from the release package or from sources, once built, how to make XCode use this version?
another way to do it is than the .xcconfig is to create a custom plug-in for Clang 3.1 or even Clang ToT or any version you install yourself. Then in your project Build Settings > Build Options > Compiler for C/C++/Objective-C, you will be able to add Clang 3.1 to the drop-down menu. The advantage is that you need to create that plug-in once and then you can use it for any future project without having to add that .xcconfig file every time you create a new project. Note also that several section banners in the Build Settings will have their name change to reflect your choice, e.g. "<here the name you chose for your compiler> - Code Generation".
Please find attached the one I have written for myself. You have to expand it in the directory "Library/Application Support/Developer/Shared/Xcode/Plug-ins". Note that this is not a hack by any mean as XCode (version 3 or 4) uses such plugin itself. You will notice that I called the compiler "LLVM/Clang ToT" and XCode is told to find it in /usr/local/bin. You can change those info to whatever you like. "LLVM/Clang 3.1" would be a better name in your case.