-
Notifications
You must be signed in to change notification settings - Fork 206
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(cherry picked from commit db96214)
- Loading branch information
Showing
8 changed files
with
148 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
TOPDIR="###CLION_SCRIPT_TOPDIR###" | ||
BUILD_DIR="###RELATIVE_BUILD_DIR###" | ||
PATHTOOL="###PATHTOOL###" | ||
|
||
|
||
|
||
cd "`dirname $0`" | ||
SCRIPT_DIR="`pwd`" | ||
cd "$TOPDIR" | ||
|
||
echo "Updating Clion project files in \"$SCRIPT_DIR\" for project \"`pwd`\"" | ||
|
||
set -o pipefail | ||
make compile-commands SPEC="$BUILD_DIR/spec.gmk" | sed 's/^/ /' || exit 1 | ||
|
||
if [ "x$PATHTOOL" != "x" ]; then | ||
CLION_PROJECT_DIR="`$PATHTOOL -am $SCRIPT_DIR`" | ||
sed "s/\\\\\\\\\\\\\\\\/\\\\\\\\/g" "$BUILD_DIR/compile_commands.json" > "$SCRIPT_DIR/compile_commands.json" | ||
else | ||
CLION_PROJECT_DIR="$SCRIPT_DIR" | ||
cp "$BUILD_DIR/compile_commands.json" "$SCRIPT_DIR" | ||
fi | ||
|
||
echo " | ||
Now you can open \"$CLION_PROJECT_DIR\" as Clion project | ||
If Clion complains about missing files when loading a project, building it may help: | ||
cd \"`pwd`\" && make SPEC=\"$BUILD_DIR/spec.gmk\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters