Skip to content

Instantly share code, notes, and snippets.

@m-ou-se
Created August 20, 2018 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m-ou-se/0d0e27c4165adba2cb27177b6c3a89cf to your computer and use it in GitHub Desktop.
Save m-ou-se/0d0e27c4165adba2cb27177b6c3a89cf to your computer and use it in GitHub Desktop.
Makefile for CMake+Ninja
.PHONY: .always
all:
Makefile:
#
build/build.ninja:
mkdir -p build
cd build && CXX='clang++ -fdiagnostics-color' CC='clang -fdiagnostics-color' cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -G Ninja
%: build/build.ninja .always
@ninja -C build $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment