Skip to content

Instantly share code, notes, and snippets.

@psqq
Created May 23, 2017 16:23
Show Gist options
  • Select an option

  • Save psqq/28db5d02db4a703a4e01e913915fdfad to your computer and use it in GitHub Desktop.

Select an option

Save psqq/28db5d02db4a703a4e01e913915fdfad to your computer and use it in GitHub Desktop.
file(GLOB SRCS "*.cpp")
add_executable(hello ${SRCS})
set_property(TARGET hello PROPERTY CXX_STANDARD 11)
#include <iostream>
using namespace std;
void hello() {
cout << "Hello, World!" << endl;
}
void hello();
int main() {
hello();
}
.PHONY: build clean rebuild
all: build
clean:
rm -r build
build:
mkdir -p build
cd build && cmake .. && make && cp hello ..
rebuild: clean build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment