Hi,
I'm trying to use xctools or xcodebuild to generate a compile_commands.json to create a html or pmd(xml) report for Jenkins. For now i'm having different problems as having empty(only [] showing) compile_commands.json file when building with dependency frameworks(cocoa pods).
With a simpele project it generates the attached compile_commands.json. Now, when i'm having a seemingly correct commands file, by running oclint-json-compilation-database it will give errors like the following:
While building module 'UIKit' imported from /Users/eelcokoelewijn/Developer/afl_ios_xctooltest/xctool_test/xctool_test/xctool_test-Prefix.pch:14:
While building module 'QuartzCore' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework/Headers/UICollectionViewLayout.h:11:
While building module 'OpenGLES' imported from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CAEAGLLayer.h:7:
In file included from <module-includes>:1:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework/Headers/EAGL.h:8:10: fatal error: could not build module 'Foundation'
#include <Foundation/Foundation.h>
I'm using oclint 0.7 with xcode 5 installed on a mac with osx 10.8.5. For creating the compile_commands.json i used xctool with -reporter json-compilation-database:compile_commands.json flag. Also tried xcodebuild and then oclint-xcodebuild to create compile_commands.json, this commands file also produces the same problem.
Attached is the compile_commands.json for a simple project which gives the above errors.
Any tips are welcome!