Makefile 421 B

12345678910111213141516
  1. build-performance = release
  2. all: build
  3. $(build-performance): CMakeLists.txt
  4. cmake -GNinja -S. -Bcmake-build-$(build-performance) -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
  5. compile_commands.json: $(build-performance)
  6. cp cmake-build-$(build-performance)/compile_commands.json .
  7. build: compile_commands.json
  8. ninja -Ccmake-build-$(build-performance)
  9. clean:
  10. rm -r cmake-build-$(build-performance)