summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md43
1 files changed, 25 insertions, 18 deletions
diff --git a/README.md b/README.md
index f35b7f09..88787dbb 100644
--- a/README.md
+++ b/README.md
@@ -44,10 +44,32 @@ $ cd wabt
This will fetch the testsuite and gtest repos, which are needed for some tests.
-## Building (macOS and Linux)
+## Building using CMake directly (Linux and macOS)
-You'll need [CMake](https://cmake.org). If you just run `make`, it will run
-CMake for you, and put the result in `out/clang/Debug/` by default:
+You'll need [CMake](https://cmake.org). You can then run CMake, the normal way:
+
+```console
+$ mkdir build
+$ cd build
+$ cmake ..
+...
+```
+
+This will produce build files using CMake's default build generator. Read the CMake
+documentation for more information.
+
+**NOTE**: You must create a separate directory for the build artifacts (e.g. `build` above).
+Running `cmake` from the repo root directory will not work since the build produces an
+executable called `wasm2c` which conflicts with the `wasm2c` directory.
+
+## Building using the top-level `Makefile` (Linux and macOS)
+
+**NOTE**: Under the hood, this uses `make` to run CMake, which then calls `make` again.
+On some systems (typically macOS), this doesn't build properly. If you see these errors,
+you can build using CMake directly as described above.
+
+You'll need [CMake](https://cmake.org). If you just run `make`, it will run CMake for you,
+and put the result in `out/clang/Debug/` by default:
> Note: If you are on macOS, you will need to use CMake version 3.2 or higher
@@ -58,10 +80,6 @@ $ make
This will build the default version of the tools: a debug build using the Clang
compiler.
-**NOTE**: Under the hood, this uses make to run CMake, which then calls make again.
-On some systems, this doesn't build properly. If you see these errors, you can build
-using CMake directly as described below.
-
There are many make targets available for other configurations as well. They
are generated from every combination of a compiler, build type and
configuration.
@@ -80,17 +98,6 @@ $ make clang-debug-lsan
$ make gcc-debug-no-re2c
```
-### Building using CMake directly
-
-You can also run CMake yourself, the normal way:
-
-```console
-$ mkdir build
-$ cd build
-$ cmake ..
-...
-```
-
## Building (Windows)
You'll need [CMake](https://cmake.org). You'll also need