Skip to content

Commit

Permalink
INSTALL.md: add example for multi-config generators (#736)
Browse files Browse the repository at this point in the history
Signed-off-by: Veprev, Alexey <alexey.veprev@intel.com>

Co-authored-by: Alexandra <alexandra.epanchinzeva@intel.com>
  • Loading branch information
AlexVeprev and aepanchi committed Jan 19, 2022
1 parent 1318c05 commit 70ac244
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions INSTALL.md
Expand Up @@ -79,7 +79,9 @@ cpack

## Example of Installation

The following example demonstrates how to install oneTBB.
### Single-configuration generators

The following example demonstrates how to install oneTBB for single-configuration generators (e.g. GNU Make, Ninja, etc.).
```bash
# Do our experiments in /tmp
cd /tmp
Expand All @@ -88,11 +90,33 @@ git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB
# Create binary directory for out-of-source build
mkdir build && cd build
# Configure. Customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
# Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
cmake -DCMAKE_INSTALL_PREFIX=/tmp/my_installed_onetbb -DTBB_TEST=OFF ..
# Build
cmake --build .
# Install
cmake --install .
# Well done! Your installed oneTBB is in /tmp/my_installed_onetbb
```

### Multi-configuration generators

The following example demonstrates how to install oneTBB for multi-configuration generators such as Visual Studio*.

Choose the configuration during the build and install steps:
```batch
REM Do our experiments in %TMP%
cd %TMP%
REM Clone oneTBB repository
git clone https://github.com/oneapi-src/oneTBB.git
cd oneTBB
REM Create binary directory for out-of-source build
mkdir build && cd build
REM Configure: customize CMAKE_INSTALL_PREFIX and disable TBB_TEST to avoid tests build
cmake -DCMAKE_INSTALL_PREFIX=%TMP%\my_installed_onetbb -DTBB_TEST=OFF ..
REM Build "release with debug information" configuration
cmake --build . --config relwithdebinfo
REM Install "release with debug information" configuration
cmake --install . --config relwithdebinfo
REM Well done! Your installed oneTBB is in %TMP%\my_installed_onetbb
```

0 comments on commit 70ac244

Please sign in to comment.