Skip to content

Instantly share code, notes, and snippets.

@ianliu
Created December 5, 2013 10:55
Show Gist options
  • Save ianliu/7803482 to your computer and use it in GitHub Desktop.
Save ianliu/7803482 to your computer and use it in GitHub Desktop.
A simple Makefile for cmake builds!
all clean: build build-opt
@$(MAKE) -s -C build $@
@$(MAKE) -s -C build-opt $@
build:
mkdir -p $@ ; cd $@ && \
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=Yes \
-DCMAKE_BUILD_TYPE=Debug ..
build-opt:
mkdir -p $@ ; cd $@ && \
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=Yes \
-DCMAKE_BUILD_TYPE=Release ..
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment