Setting up Intel Cluster Compiler with XCode 4
I just spent an hour fighting with dump Intel license server (for trial version). I’m to angry to write, so here is the solution.
The easy part
Download Composer XE for Mac from Intel website, run .dmg, click .pkg, click, click, blah, select XCode integration, click, done.
It will install everything under /opt/intel and … under /Developer/ (no, symlinks, separate install - well, wtf?)
To use icc from command line it is required to run
first.
If you use zsh, then you’ll have to modify /opt/intel/bin/iccvars.sh file and change all “==” to “=” .
Now icc should work from command line. Btw, better add this “source …” line to you .bashrc/.zshrc or you’ll end up typing that command on every new shell.
The “how to make people frustrated” part
Run XCode, choose new c++ project. In project setting select correct compiler:

You can try to hit cmd+b and pray it will work. I’m not that lucky.
It doesn’t work without executing this dump “source” line. I tried to setup build phases, pre-actions and… nothing worked. So, here is the hacky way to make it work.
then open new icc file in editor and put there:Do the same with icpc.
Now license server shit will be loaded when xcode executes /Developer/usr/bin/icc
But, that’s not everything yet. /Developer/usr/lib is missing some libraries. Just copy what needed from /opt/intel/lib (I needed libimf.a, but it may vary).
After all that hacks it *should* work…