mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #30863 from matthewoliver/improve_do_cmake
do_cmake.sh: Add CEPH_GIT_DIR Reviewed-by: Nathan Cutler <ncutler@suse.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
d4d31687c3
12
README.md
12
README.md
@ -61,13 +61,17 @@ Build instructions:
|
||||
|
||||
(Note: do_cmake.sh now defaults to creating a debug build of ceph that can
|
||||
be up to 5x slower with some workloads. Please pass
|
||||
"-DCMAKE_BUILD_TYPE=RelWithDebInfo" to do_cmake.sh to create a non-debug
|
||||
"-DCMAKE_BUILD_TYPE=RelWithDebInfo" to do_cmake.sh to create a non-debug
|
||||
release.)
|
||||
|
||||
(Note: `make` alone will use only one CPU thread, this could take a while. use
|
||||
the `-j` option to use more threads. Something like `make -j$(nproc)` would be
|
||||
a good start.
|
||||
|
||||
This assumes you make your build dir a subdirectory of the ceph.git
|
||||
checkout. If you put it elsewhere, just replace `..` in do_cmake.sh with a
|
||||
correct path to the checkout. Any additional CMake args can be specified
|
||||
setting ARGS before invoking do_cmake. See [cmake options](#cmake-options)
|
||||
checkout. If you put it elsewhere, just point `CEPH_GIT_DIR`to the correct
|
||||
path to the checkout. Any additional CMake args can be specified setting ARGS
|
||||
before invoking do_cmake. See [cmake options](#cmake-options)
|
||||
for more details. Eg.
|
||||
|
||||
ARGS="-DCMAKE_C_COMPILER=gcc-7" ./do_cmake.sh
|
||||
|
@ -3,7 +3,8 @@ set -x
|
||||
|
||||
git submodule update --init --recursive
|
||||
|
||||
[ -z "$BUILD_DIR" ] && BUILD_DIR=build
|
||||
: ${BUILD_DIR:=build}
|
||||
: ${CEPH_GIT_DIR:=..}
|
||||
|
||||
if [ -e $BUILD_DIR ]; then
|
||||
echo "'$BUILD_DIR' dir already exists; either rm -rf '$BUILD_DIR' and re-run, or set BUILD_DIR env var to a different directory name"
|
||||
@ -56,7 +57,7 @@ if type cmake3 > /dev/null 2>&1 ; then
|
||||
else
|
||||
CMAKE=cmake
|
||||
fi
|
||||
${CMAKE} $ARGS "$@" .. || exit 1
|
||||
${CMAKE} $ARGS "$@" $CEPH_GIT_DIR || exit 1
|
||||
set +x
|
||||
|
||||
# minimal config to find plugins
|
||||
|
Loading…
Reference in New Issue
Block a user