New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any way to get cmake to output an Xcode project file? #382
Comments
Hope http://docs.oclint.org/en/stable/devel/index.html can help. |
Which part of that @ryuichis? I can build it fine with the instructions on that page. However, when specifically trying to output an Xcode project with CMake, the command fails. I don't see anything on that page regarding this. |
@JohnCoates hey, sorry, I didn't catch your point earlier. Frankly speaking, I am not aware of people who work on oclint project entirely inside Xcode. I know people who just use it as a syntax highlighter but not fully depend on it. Maybe you can work with me and try to understand if using Xcode is doable. Back to the initial question: could you try to call the following commands inside
before running I am not sure if it will work, but at least, a good starting point. I pointed the link to the document earlier, because if you give up Xcode and want to work on your new rules by using your favorite text editor, that link should have the info you need for setting things up, and the scaffolding script to ease some of the rule generations. |
Thanks for working with me on this. Below is the result I got, and unfortunately I got the same error as above when running
Unfortunately I'm not familiar with CMake scripts, so I don't know how to point it to the right direction to look for the LLVM cmake files. I'll try and look into this. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment. |
This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem. |
cmake -G "Xcode" ../llvm-4.0.1.src works for me |
Running that only built an Xcode project for llvm, and I didn't see any OCLint targets. For reference here all the commands I ran:
|
Figured it out! Here are the commands I ran to get oclint-rules compiling in Xcode.
|
@JohnCoates thanks for providing this detailed instructions, do you want to add this to https://github.com/oclint/oclint-docs, so that others can get benefits from your effort as well? And by the way, your first two steps can be simplified to Moreover, if you don't want to build LLVM/clang locally, instead, you rather use a prebuilt binary, then you can call |
Thanks for the suggestions @ryuichis. I've attached a rst document |
Nice, by looking at this, I started to think it will be better to add a script to |
Yeah that sounds like a simpler solution! |
I'm trying to make a new rule, but it would be useful if I could work within Xcode.
I get the following error when running
cmake -G Xcode
I've tried changing the LLVM_DIR in the produced CMakeCache.txt but that doesn't work either. Just wondering if there's a recommended way to do this?
The text was updated successfully, but these errors were encountered: