Commit bbd057b231594c55455e4f709d1d9b8a0e14e125
1 parent
63f7cfdb
Add -DCMAKE_EXPORT_COMPILE_COMMANDS=1 in README-maintainer
This creates an output used by emacs lsp-mode.
Showing
1 changed file
with
8 additions
and
4 deletions
README-maintainer
| @@ -4,18 +4,21 @@ ROUTINE DEVELOPMENT | @@ -4,18 +4,21 @@ ROUTINE DEVELOPMENT | ||
| 4 | 4 | ||
| 5 | Default: | 5 | Default: |
| 6 | 6 | ||
| 7 | -cmake -DMAINTAINER_MODE=1 -DBUILD_STATIC_LIBS=0 \ | 7 | +cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ |
| 8 | + -DMAINTAINER_MODE=1 -DBUILD_STATIC_LIBS=0 \ | ||
| 8 | -DCMAKE_BUILD_TYPE=RelWithDebInfo .. | 9 | -DCMAKE_BUILD_TYPE=RelWithDebInfo .. |
| 9 | 10 | ||
| 10 | Debugging: | 11 | Debugging: |
| 11 | 12 | ||
| 12 | -cmake -DMAINTAINER_MODE=1 -DBUILD_SHARED_LIBS=0 \ | 13 | +cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ |
| 14 | + -DMAINTAINER_MODE=1 -DBUILD_SHARED_LIBS=0 \ | ||
| 13 | -DCMAKE_BUILD_TYPE=Debug .. | 15 | -DCMAKE_BUILD_TYPE=Debug .. |
| 14 | 16 | ||
| 15 | Profiling: | 17 | Profiling: |
| 16 | 18 | ||
| 17 | CFLAGS=-pg LDFLAGS=-pg \ | 19 | CFLAGS=-pg LDFLAGS=-pg \ |
| 18 | - cmake -DMAINTAINER_MODE=1 -DBUILD_SHARED_LIBS=0 \ | 20 | + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ |
| 21 | + -DMAINTAINER_MODE=1 -DBUILD_SHARED_LIBS=0 \ | ||
| 19 | -DCMAKE_BUILD_TYPE=Debug .. | 22 | -DCMAKE_BUILD_TYPE=Debug .. |
| 20 | 23 | ||
| 21 | Then run `gprof gmon.out`. Note that gmon.out is not cumulative. | 24 | Then run `gprof gmon.out`. Note that gmon.out is not cumulative. |
| @@ -26,7 +29,8 @@ CFLAGS="-fsanitize=address -fsanitize=undefined" \ | @@ -26,7 +29,8 @@ CFLAGS="-fsanitize=address -fsanitize=undefined" \ | ||
| 26 | CXXFLAGS="-fsanitize=address -fsanitize=undefined" \ | 29 | CXXFLAGS="-fsanitize=address -fsanitize=undefined" \ |
| 27 | LDFLAGS="-fsanitize=address -fsanitize=undefined" \ | 30 | LDFLAGS="-fsanitize=address -fsanitize=undefined" \ |
| 28 | CC=clang CXX=clang++ \ | 31 | CC=clang CXX=clang++ \ |
| 29 | - cmake -DMAINTAINER_MODE=1 -DBUILD_SHARED_LIBS=0 \ | 32 | + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 \ |
| 33 | + -DMAINTAINER_MODE=1 -DBUILD_SHARED_LIBS=0 \ | ||
| 30 | -DCMAKE_BUILD_TYPE=Debug .. | 34 | -DCMAKE_BUILD_TYPE=Debug .. |
| 31 | 35 | ||
| 32 | Windows: | 36 | Windows: |