Enable compile_commands.json in CMake.

This CL enables the generation of compile_commands.json so it happens
automatically. This is needed for a lot of tools like clangd to operate
correctly so is useful to have happen by default.

Change-Id: I61b001953aa5e621d82f3d78e3fd7b2077dcd540
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/161641
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5faeb1b..f4b5ffc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,6 +47,7 @@
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 set(CMAKE_CXX_STANDARD 17)
 set(CMAKE_DEBUG_POSTFIX "")
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
 
 if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
   message(STATUS "No build type selected, default to Debug")