App downloads required dependencies by using CocoaPods and when SonarQube tries to build targets and dependencies build is getting failed
Run command is:
$HOME/.sonar/build-wrapper-macosx-x86/build-wrapper-macosx-x86 --out-dir bw-output xcodebuild clean build -workspace App.xcworkspace -scheme “App scheme”
Error message:
/Users/runner/work/App Folder/App Folder/AppName/Pods/Target Support Files/Pods-App-target/Pods-App-Apptarget.debug.xcconfig:1:1: error: unable to open configuration settings file
what version of SonarQube and build-wrapper are you using?
If you are facing issues with build-wrapper you could try the JSON Compilation Database. You can have a look at [CPP-3987] - Jira on how to use -gen-cdb-fragment-path to generate a JSON Compilation Database.
No, I had tried but didn’t get proper steps. Tried with CMake tool but compile_commands.json file is not getting generated in git repository.
If you know the steps, Please let me know
You can find information on how to generate the JSON compilation database in this ticket: [CPP-3987] - Jira . With:
# use Clang compiler feature to generate partial compilation database files and aggregate them. You need to set -gen-cdb-fragment-path on OTHER_CFLAGS of xcodebuild command line:
# add to your xcodebuild command: OTHER_CFLAGS="\$(inherited) -gen-cdb-fragment-path \$(PROJECT_DIR)/CompilationDatabase"
xcodebuild clean build arg1 .. argN OTHER_CFLAGS="\$(inherited) -gen-cdb-fragment-path \$(PROJECT_DIR)/CompilationDatabase"
pushd CompilationDatabase
sed -e '1s/^/[\'$'\n''/' -e '$s/,$/\'$'\n'']/' *.json > ../compile_commands.json
popd