From b40be5f7fa54e384c589fd001f69b093eca083a7 Mon Sep 17 00:00:00 2001 From: Jesse Zhang Date: Wed, 1 Nov 2017 09:07:26 -0700 Subject: [PATCH] Slight README clean up (#250) Cleans up README and simplifies build steps 1. Remove leftover mentions of `make` in the context of building ORCA 1. Because ninja is parallel by default, remove mentions of how to parallelize the build * Simplify build steps in README Noticeably, we no longer require the two most hated steps: cd-after-mkdir-build. Instead `cmake` will directly mkdir the build directly if it doesn't exist. * [ci skip] This fixes #248 --- README.md | 39 +++++++++++---------------------------- 1 file changed, 11 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 18fa183d57..a381ea1200 100644 --- a/README.md +++ b/README.md @@ -48,10 +48,8 @@ really really fast and convenient. Go into `gporca` directory: ``` -mkdir build -cd build -cmake -GNinja ../ -ninja install +cmake -GNinja -H. -Bbuild +ninja install -C build ``` @@ -166,23 +164,18 @@ ready for use in production-level CI environments. # Advanced Setup -## How to generate make files with different options +## How to generate build files with different options -Here are few build flavors: +Here are a few build flavors (commands run from the ORCA checkout directory): ``` # debug build -cmake -GNinja -D CMAKE_BUILD_TYPE=DEBUG ../ +cmake -GNinja -D CMAKE_BUILD_TYPE=DEBUG -H. -Bbuild.debug ``` ``` # release build with debug info -cmake -GNinja -D CMAKE_BUILD_TYPE=RelWithDebInfo ../ -``` - -``` -# release build -cmake -GNinja -D CMAKE_BUILD_TYPE=RELEASE ../ +cmake -GNinja -D CMAKE_BUILD_TYPE=RelWithDebInfo -H. -Bbuild.release ``` ## Explicitly Specifying GP-Xerces For Build @@ -245,18 +238,12 @@ And for 64-bit x86: cmake -GNinja -D CMAKE_TOOLCHAIN_FILE=../cmake/x86_64.toolchain.cmake ../ ``` -## How to speed-up the build (or debug it) +## How to debug the build -For faster build use the -j option of make. For instance, the following command runs make on 7 job slots +Show all command lines while building (for debugging purpose) ``` -make -j7 -``` - -Show all commands being run as part of make (for debugging purpose) - -``` -make VERBOSE=1 +ninja -v -C build ``` ### Extended Tests @@ -280,7 +267,7 @@ GPORCA has four libraries: By default, GPORCA will be installed under /usr/local. You can change this by setting CMAKE_INSTALL_PREFIX when running cmake, for example: ``` -cmake -GNinja -D CMAKE_INSTALL_PREFIX=/home/user/gporca ../ +cmake -GNinja -D CMAKE_INSTALL_PREFIX=/home/user/gporca -H. -Bbuild ``` By default, the header files are located in: @@ -301,13 +288,9 @@ the library is located at: Build and install: ``` -make install +ninja install -C build ``` -Build and install with verbose output -``` -make VERBOSE=1 install -``` ## Cleanup -- GitLab