From a93e90cf3c50344a2582acb0e60187dbef90ee28 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Mon, 30 May 2022 20:44:53 +0200 Subject: cmake: add example how to integrate cargo --- content/2022-05-30-cmake-cargo-example/Makefile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 content/2022-05-30-cmake-cargo-example/Makefile (limited to 'content/2022-05-30-cmake-cargo-example/Makefile') diff --git a/content/2022-05-30-cmake-cargo-example/Makefile b/content/2022-05-30-cmake-cargo-example/Makefile new file mode 100644 index 0000000..e269cb2 --- /dev/null +++ b/content/2022-05-30-cmake-cargo-example/Makefile @@ -0,0 +1,14 @@ +TYPE ?= Debug +BDIR := BUILD/$(TYPE) + +calc: config + cmake --build $(BDIR) --target calc + +config: CMakeLists.txt + cmake -B $(BDIR) -DCMAKE_BUILD_TYPE=$(TYPE) . + +run: calc + $(BDIR)/calc + +clean: + $(RM) -r BUILD -- cgit v1.2.3