rizsotto / Bear

Bear is a tool that generates a compilation database for clang tooling.
GNU General Public License v3.0
4.97k stars 321 forks source link

Unrecognized parameter in version 3.x #358

Closed BrushXue closed 3 years ago

BrushXue commented 3 years ago

Describe the bug Something wrong with the recent version(3.x). Rolled back to 2.4.4_1 and the code successfully compiled

Installation script:

export BEAR_COMPILE_PREFIX="bear --append --cdb=$(pwd)/compile_commands.json"

Result:

Unrecognized parameter: "--cdb=/Users/gux215/OpenFOAM/swak4Foam/compile_commands.json"
Usage: bear [--output <arg>] [--verbose] -- ...

To Reproduce Update to the latest version.

Expected behavior

Environment:

Additional context Xcode 12.4

$ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
rizsotto commented 3 years ago

Have you tried bear --help or man bear? Some Bear command line parameter has been changed.