From 3460cd809b6dd311b58e92733ece2fc956224fd2 Mon Sep 17 00:00:00 2001 From: Nick Wellnhofer Date: Tue, 17 Dec 2024 20:41:57 +0100 Subject: [PATCH] README: Make cmake instructions more portable and simple Don't assume that make is used. Don't change directories. --- README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5318bcf02..5a6874abc 100644 --- a/README.md +++ b/README.md @@ -84,19 +84,15 @@ For a more portable method, you can use [cmake] manually. [cmake] knows how to create build environments for many build systems. For example, on FreeBSD: - mkdir build - cd build - cmake .. # optionally: -DCMAKE_INSTALL_PREFIX=path - make # executable will be created as build/src/cmark - make test - make install + cmake -S . -B build # optionally: -DCMAKE_INSTALL_PREFIX=path + cmake --build build # executable will be created as build/src/cmark + ctest --test-dir build + cmake --install build Or, to create Xcode project files on OSX: - mkdir build - cd build - cmake -G Xcode .. - open cmark.xcodeproj + cmake -S . -B build -G Xcode + open build/cmark.xcodeproj The GNU Makefile also provides a few other targets for developers. To run a benchmark: