Skip to content

Commit 3460cd8

Browse files
nwellnhofjgm
authored andcommitted
README: Make cmake instructions more portable and simple
Don't assume that make is used. Don't change directories.
1 parent 379741f commit 3460cd8

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,15 @@ For a more portable method, you can use [cmake] manually. [cmake] knows
8484
how to create build environments for many build systems. For example,
8585
on FreeBSD:
8686

87-
mkdir build
88-
cd build
89-
cmake .. # optionally: -DCMAKE_INSTALL_PREFIX=path
90-
make # executable will be created as build/src/cmark
91-
make test
92-
make install
87+
cmake -S . -B build # optionally: -DCMAKE_INSTALL_PREFIX=path
88+
cmake --build build # executable will be created as build/src/cmark
89+
ctest --test-dir build
90+
cmake --install build
9391

9492
Or, to create Xcode project files on OSX:
9593

96-
mkdir build
97-
cd build
98-
cmake -G Xcode ..
99-
open cmark.xcodeproj
94+
cmake -S . -B build -G Xcode
95+
open build/cmark.xcodeproj
10096

10197
The GNU Makefile also provides a few other targets for developers.
10298
To run a benchmark:

0 commit comments

Comments
 (0)