Skip to content

Commit

Permalink
fix compile_commands
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Dec 25, 2022
1 parent 356e329 commit 3cb3727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions scripts/srcenv.profile
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# cd projectdir
export XMAKE_PROGRAM_DIR=`pwd`/xmake
if [ -f `pwd`/core/build/xmake ]; then
alias xmake=`pwd`/core/build/xmake
export XMAKE_PROGRAM_FILE=`pwd`/core/build/xmake
else
alias xmake=`pwd`/core/src/demo/demo.b
export XMAKE_PROGRAM_FILE=`pwd`/core/src/demo/demo.b
fi
alias xmake=`pwd`/build/xmake
export XMAKE_PROGRAM_FILE=`pwd`/build/xmake
alias xrepo=`pwd`/scripts/xrepo.sh
xmake --version
xmake l xmake.programdir
Expand Down
2 changes: 1 addition & 1 deletion xmake/plugins/project/clang/compile_commands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ function _translate_arguments(arguments)
if arg then
-- split "/usr/bin/xcrun -sdk macosx clang"
-- @see https://github.com/xmake-io/xmake/issues/3159
if idx == 1 and arg:find(" ", 1, true) then
if idx == 1 and not os.isfile(arg) and arg:find(" ", 1, true) then
table.join2(args, os.argv(arg))
else
table.insert(args, arg)
Expand Down

0 comments on commit 3cb3727

Please sign in to comment.