Do not tell people to cd into a build directory that may not exist
The recipe ended with "cd ../collocatordb/build", which assumes that the two
repositories are next to each other and that the build directory already
exists. When that cd fails one stays in the rocksdb sources, and the cmake call
after it configures something else entirely, which then shows up as
make: *** No targets specified and no makefile found. Stop.
cmake -S <sources> -B <build directory> says both explicitly and works from
wherever one happens to stand.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: I8c9b24c7de4c95f102d974521fc06753979e8298
diff --git a/README.md b/README.md
index abb6c00..d04fa79 100644
--- a/README.md
+++ b/README.md
@@ -71,17 +71,22 @@
```bash
git clone https://github.com/facebook/rocksdb.git -b v$(rpm -q --qf '%{VERSION}' rocksdb) --single-branch
-cd rocksdb
-cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
+cmake -S rocksdb -B rocksdb/build -DCMAKE_BUILD_TYPE=Release \
-DFAIL_ON_WARNINGS=OFF \
-DWITH_TESTS=OFF -DWITH_BENCHMARK_TOOLS=OFF -DWITH_TOOLS=OFF -DWITH_CORE_TOOLS=OFF \
-DROCKSDB_BUILD_SHARED=OFF \
-DCMAKE_INSTALL_PREFIX=$HOME/rocksdb-static
+cmake --build rocksdb/build -j $(nproc)
+cmake --install rocksdb/build
+```
+
+and then, in the collocatordb sources:
+
+```bash
+cmake -S . -B build -DROCKSDB_STATIC=$HOME/rocksdb-static/lib/librocksdb.a \
+ -DCMAKE_INSTALL_PREFIX=/usr/local
cmake --build build -j $(nproc)
-cmake --install build
-cd ../collocatordb/build
-cmake -DROCKSDB_STATIC=$HOME/rocksdb-static/lib/librocksdb.a -DCMAKE_INSTALL_PREFIX=/usr/local ..
-make && sudo make install && sudo ldconfig
+sudo cmake --install build && sudo ldconfig
```
`WITH_TESTS` and the tools bring in the bundled gtest, which is not needed for