-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Provide a cmake script for build & install from source
The cmake/TBBBuildInstallScript.cmake allows for building TBB in a temporary build directory under the mandated TBB build heirarchy. From the tempory build directory the headers, libraries, and CMake package config files are installed in relocatable directory heirachy that mimics the common unix scheme of {install_prefix}/lib/lib*.[so|dylib|a] {install_prefix}/lib/cmake/TBB/*.cmake {install_prefix}include/tbb/*.h NOTE: The {install_prefix}/lib/cmake/TBB/*.cmake files use relative paths, so these files are relocatable to any {install_prefix} after the initial install occurs. NOTE: The TBBConfigForSource.cmake.in and TBBConfig.cmake.in files were merged as they only differed in how they set the _tbb_release_lib_dir, _tbb_debug_lib_dir, _tbb_include_dir variables, so that is now managed by a simple if() statement where the argument of the if is hard-coded at configure time. NOTE: A test case that builds a minimal program from the installed directory has been added. NOTE: TBBBiuld now exposes options to support more flexible building while maintaining backwards compatiblity with the default settings. NOTE: Moved platform default values to TBBPlatformDefaults.cmake so that they are used consistently across units. Example invocation to configure, build, install, and test against installed binaries. cmake \ -DCMAKE_INSTALL_PREFIX=/tmp/tbbinstall \ -DTBB_BUILD_DIR:PATH=/tmp/buildtbb \ -DTBB_BUILD_PREFIX:STRING=unix_cmake_build \ -DTBB_RELATIVE_CMAKE_CONFIG_PATH:PATH=lib/cmake/TBB \ -DTBB_LIBDIR_NAME:STRING=lib \ -DTBB_COMPILER:STRING=clang \ -DTBB_BUILD_STATIC:BOOL=ON \ -DTBB_BUILD_SHARED:BOOL=ON \ -DTBB_DO_EXTERNAL_CMAKE_BUILD_TEST:BOOL=ON \ -P cmake/TBBBuildInstallScript.cmake
- Loading branch information
1 parent
010ae25
commit 6e9402d
Showing
10 changed files
with
496 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...ohnsonhj/src/tbb/$/tmp/tbbbuild/lib/dummy1/cmake/dummy2/TBB/dummy3/TBBConfigVersion.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright (c) 2017-2018 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# | ||
# | ||
# | ||
|
||
set(PACKAGE_VERSION 2019.0) | ||
|
||
if ("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_COMPATIBLE FALSE) | ||
else() | ||
set(PACKAGE_VERSION_COMPATIBLE TRUE) | ||
if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") | ||
set(PACKAGE_VERSION_EXACT TRUE) | ||
endif() | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.