I was trying to generate compile_command.json file using CMAKE_EXPORT_COMPILE_COMMANDS for IOS, but CMake recognize this option CMAKE_EXPORT_COMPILE_COMMANDS only if we use Ninja Generator. "-G Ninja" and I am using XCode Generator.
I was trying to generate compile_command.json file using CMAKE_EXPORT_COMPILE_COMMANDS for IOS, but CMake recognize this option CMAKE_EXPORT_COMPILE_COMMANDS only if we use Ninja Generator. "-G Ninja" and I am using XCode Generator.
xcodebuild -project path/to/.xcodeproj | xcpretty -r json-compilation-database --output path/for/compile_commands.json