Skip to content

Commit ae385a7

Browse files
committed
updated README
1 parent 7dec0c1 commit ae385a7

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,24 @@ You have to create a `compile_commands.json` file in the `build` directory of th
4040
You can do it either with `catkin` or with `cmake`.
4141

4242
```bash
43-
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-3.8 src
43+
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-6.0 src
4444
```
4545

4646
Or
4747

4848
```bash
49-
catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-3.8
49+
catkin_make -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-6.0
5050
```
5151

5252
Replace `src` in the first command with the source space of your workspace, if it is named differently.
53-
Replace `/usr/bin/clang++-3.8` with the correct path to your `clang++` version.
53+
Replace `/usr/bin/clang++-6.0` with the correct path to your `clang++` version.
54+
55+
**Note:** it might be useful to turn this into a script and place it at the root of the workspace, so that you do not forget to update `compile_commands.json` when you build your ROS workspace.
56+
57+
```bash
58+
#!/usr/bin/env bash
59+
catkin_make --force-cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCMAKE_CXX_COMPILER=/usr/bin/clang++-6.0
60+
```
5461

5562
## Standalone Usage
5663

0 commit comments

Comments
 (0)