Generate compile_commands.json by default (#9763)
Generate compile_commands.json by default (#9763)

* Generate compile_commands.json by default

This is low overhead (it only affects the make-generation step, not the actual build) and makes developer tooling like clangd work much better, so we should have it on by default instead of off (which is CMake's default). If necessary, it can be disabled with

```bash
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=0 ...
```

* Add skip when run in a subproject

* Update CMakeLists.txt

Co-authored-by: Andrew Reusch <a318e060cf8df30253cb2f58d0f9fc863b4ce2f5@gmail.com>

Co-authored-by: driazati <d4a88e6bfb8aaeeaf240b84a2d19cb6109e58027@users.noreply.github.com>
Co-authored-by: Andrew Reusch <a318e060cf8df30253cb2f58d0f9fc863b4ce2f5@gmail.com>
dmlc/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1,dmlc/tvm,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,Laurawly/tvm-1,dmlc/tvm,Laurawly/tvm-1,Laurawly/tvm-1,Laurawly/tvm-1,dmlc/tvm