From 43ce32922b76f4d42df7d293ab7ce147d2c6006c Mon Sep 17 00:00:00 2001 From: Cat Flynn Date: Sun, 23 Jul 2023 16:46:30 +0200 Subject: [PATCH] chore: build with cmake --- .gitignore | 1 + CMakeLists.txt | 5 +++++ hello.cpp | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d163863 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..303e443 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.27) + +project(HelloWorld) + +add_executable(${PROJECT_NAME} hello.cpp) \ No newline at end of file diff --git a/hello.cpp b/hello.cpp index df28b27..858a0c0 100644 --- a/hello.cpp +++ b/hello.cpp @@ -1,3 +1,14 @@ +// To compile on Windows + +// Install CMake +// https://cmake.org/download +// Add to PATH for all users +// from project root: +// mkdir build +// cd build +// cmake .. +// cmake --build . + #include int main()