1
General / CMake settings for Xcode 4.3 and LLVM 3.1
« on: March 02, 2012, 03:36:01 am »
I got it kinda working. At least well enough to where my project now compiles using C++11 and the C++11 stdlib under Clang in Xcode.
Here's what I did:
I had CMake generate files for Xcode. I then opened the SFML project generated in Xcode, and set the appropriate flags under the Language settings for -std=c++11, and the same for the std library.
After that, I built using the ALL_BUILD target. Everything should compile just fine. Next, when going to use the install target, things should build and compile, but it should choke on the copying of the files.
When this happens, you can try to get stuff set up so that sudo can read from a file what to do when it can't ask for the password. Or you can do what I did. I went to the Terminal, and ran the command that failed (executing the cmake install script, which is there in the directory you output the Xcode project files to) under sudo manually. It will copy all of the libraries to their appropriate places.
Then you can go into your project, enable the same C++11 settings, and enjoy using auto, range-for, nullptr, and all of the other warm C++11 goodness (that LLVM supports at that time, at least).
I hope this helps someone, until SFML is updated, cause I was having a hell of a time with it.
Here's what I did:
I had CMake generate files for Xcode. I then opened the SFML project generated in Xcode, and set the appropriate flags under the Language settings for -std=c++11, and the same for the std library.
After that, I built using the ALL_BUILD target. Everything should compile just fine. Next, when going to use the install target, things should build and compile, but it should choke on the copying of the files.
When this happens, you can try to get stuff set up so that sudo can read from a file what to do when it can't ask for the password. Or you can do what I did. I went to the Terminal, and ran the command that failed (executing the cmake install script, which is there in the directory you output the Xcode project files to) under sudo manually. It will copy all of the libraries to their appropriate places.
Then you can go into your project, enable the same C++11 settings, and enjoy using auto, range-for, nullptr, and all of the other warm C++11 goodness (that LLVM supports at that time, at least).
I hope this helps someone, until SFML is updated, cause I was having a hell of a time with it.