From 0234267a399701041cc58fc433f3526ad42a74ef Mon Sep 17 00:00:00 2001 From: sarathnandu Date: Tue, 6 Aug 2024 16:00:54 -0500 Subject: [PATCH 1/2] Update README.md with TBB_FIND_PACKAGE variable info --- cmake/README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/README.md b/cmake/README.md index 60df73c072..0e115871b0 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -10,6 +10,7 @@ TBB_SANITIZE:STRING - Sanitizer parameter, passed to compiler/linker TBB_SIGNTOOL:FILEPATH - Tool for digital signing, used in post-install step for libraries if provided. TBB_SIGNTOOL_ARGS:STRING - Additional arguments for TBB_SIGNTOOL, used if TBB_SIGNTOOL is set. TBB_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) build (ON by default) +DTBB_FIND_PACKAGE - Enable search for external oneTBB using find_package instead of build from sources (OFF by default) TBBMALLOC_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator build (ON by default) TBBMALLOC_PROXY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator proxy build (requires TBBMALLOC_BUILD. ON by default) TBB4PY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) Python module build (OFF by default) @@ -234,9 +235,10 @@ make test_spec It is a configuration module that is used for the integration of prebuilt oneTBB. It consists of two files (``TBBConfig.cmake`` and ``TBBConfigVersion.cmake``) and can be used via the [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) function. To use this module in your CMake project: - 1. Let CMake know where to search for TBBConfig, e.g. specify the location of ``TBBConfig.cmake`` in `TBB_DIR` (for more details about search paths, see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)). - 2. Use [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to find oneTBB. - 3. Use provided variables and/or imported targets (described below) to work with the found oneTBB. + 1. Set TBB_FIND_PACKAGE=ON + 2. Let CMake know where to search for TBBConfig, e.g. specify the location of ``TBBConfig.cmake`` in `TBB_DIR` (for more details about search paths, see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)). + 3. Use [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to find oneTBB. + 4. Use provided variables and/or imported targets (described below) to work with the found oneTBB. Example: @@ -268,7 +270,7 @@ Variable | Description `TBB_IMPORTED_TARGETS` | All created oneTBB imported targets (not supported for builds from source code) Starting from [oneTBB 2021.1](https://github.com/oneapi-src/oneTBB/releases/tag/v2021.1), GitHub* release TBBConfig files in the binary packages are located under `/lib/cmake/TBB`. -For example, `TBB_DIR` should be set to `/lib/cmake/TBB`. +For example, 'TBB_FIND_PACKAGE' should be set to ON and `TBB_DIR` should be set to `/lib/cmake/TBB`. TBBConfig files are automatically created during the build from source code and can be installed together with the library. Also, oneTBB provides a helper function that creates TBBConfig files from predefined templates. See `tbb_generate_config` in `cmake/config_generation.cmake`. From 7afbb32a2f7bd4f273a83ab8c65d003c81ea2866 Mon Sep 17 00:00:00 2001 From: sarathnandu Date: Tue, 13 Aug 2024 11:30:34 -0500 Subject: [PATCH 2/2] Update for review comments. --- cmake/README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/README.md b/cmake/README.md index 0e115871b0..3a357218d5 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -10,7 +10,7 @@ TBB_SANITIZE:STRING - Sanitizer parameter, passed to compiler/linker TBB_SIGNTOOL:FILEPATH - Tool for digital signing, used in post-install step for libraries if provided. TBB_SIGNTOOL_ARGS:STRING - Additional arguments for TBB_SIGNTOOL, used if TBB_SIGNTOOL is set. TBB_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) build (ON by default) -DTBB_FIND_PACKAGE - Enable search for external oneTBB using find_package instead of build from sources (OFF by default) +TBB_FIND_PACKAGE - Enable search for external oneTBB using find_package instead of build from sources (OFF by default) TBBMALLOC_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator build (ON by default) TBBMALLOC_PROXY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) memory allocator proxy build (requires TBBMALLOC_BUILD. ON by default) TBB4PY_BUILD:BOOL - Enable Intel(R) oneAPI Threading Building Blocks (oneTBB) Python module build (OFF by default) @@ -235,10 +235,9 @@ make test_spec It is a configuration module that is used for the integration of prebuilt oneTBB. It consists of two files (``TBBConfig.cmake`` and ``TBBConfigVersion.cmake``) and can be used via the [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) function. To use this module in your CMake project: - 1. Set TBB_FIND_PACKAGE=ON - 2. Let CMake know where to search for TBBConfig, e.g. specify the location of ``TBBConfig.cmake`` in `TBB_DIR` (for more details about search paths, see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)). - 3. Use [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to find oneTBB. - 4. Use provided variables and/or imported targets (described below) to work with the found oneTBB. + 1. Let CMake know where to search for TBBConfig, e.g. specify the location of ``TBBConfig.cmake`` in `TBB_DIR` (for more details about search paths, see [find_package](https://cmake.org/cmake/help/latest/command/find_package.html)). + 2. Use [find_package](https://cmake.org/cmake/help/latest/command/find_package.html) to find oneTBB. + 3. Use provided variables and/or imported targets (described below) to work with the found oneTBB. Example: @@ -270,7 +269,7 @@ Variable | Description `TBB_IMPORTED_TARGETS` | All created oneTBB imported targets (not supported for builds from source code) Starting from [oneTBB 2021.1](https://github.com/oneapi-src/oneTBB/releases/tag/v2021.1), GitHub* release TBBConfig files in the binary packages are located under `/lib/cmake/TBB`. -For example, 'TBB_FIND_PACKAGE' should be set to ON and `TBB_DIR` should be set to `/lib/cmake/TBB`. +For example, `TBB_DIR` should be set to `/lib/cmake/TBB`. TBBConfig files are automatically created during the build from source code and can be installed together with the library. Also, oneTBB provides a helper function that creates TBBConfig files from predefined templates. See `tbb_generate_config` in `cmake/config_generation.cmake`.