ARM-software / ComputeLibrary

The Compute Library is a set of computer vision and machine learning functions optimised for both Arm CPUs and GPUs using SIMD technologies.
MIT License
2.75k stars 767 forks source link

why compile_commands.json not generated? #1086

Closed Shipley1105 closed 5 months ago

Shipley1105 commented 6 months ago

Output of 'strings libarm_compute.so | grep arm_compute_version': 23.11 Platform:

Operating System:

Ubuntu

Problem description: I use scons Werror=1 -j8 debug=0 asserts=1 neon=0 opencl=1 embed_kernels=1 os=linux arch=armv8a export_compile_commands=True, but compile_commands.json is not generated in build folder, Could someone help me ?

Red-Eyed commented 5 months ago

Add export CMAKE_EXPORT_COMPILE_COMMANDS=1 Before compiling

sleepy-hat commented 5 months ago

Hi @Shipley1105

You can output the compile commands during the SCons build by appending export_compile_commands=1 build/compile_commands.json to your build command.

For example: scons arch=armv8a os=linux neon=1 export_compile_commands=1 build/compile_commands.json

You also need to have SCons >= 4.0 installed and available in your environment.