diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..13afcd9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +/.ninja_deps +/.ninja_log +/build.ninja +/rules.ninja +CMakeCache.txt +CMakeFiles +*.cmake +libtbb.dylib +libtbb.so +libtbb_static.a +libtbbmalloc.dylib +libtbbmalloc.so +libtbbmalloc_proxy.dylib +libtbbmalloc_proxy.so +libtbbmalloc_proxy_static.a +libtbbmalloc_static.a +tbb.def +tbbmalloc.def +version_string.ver diff --git a/CMakeLists.txt b/CMakeLists.txt index f165861..a7af58b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,27 +115,23 @@ endif () # - Added TBB_USE_GLIBCXX_VERSION macro to specify the version of GNU # libstdc++ when it cannot be properly recognized, e.g. when used # with Clang on Linux* OS. Inspired by a contribution from David A. -if(NOT TBB_USE_GLIBCXX_VERSION AND UNIX AND NOT APPLE) +if (NOT TBB_USE_GLIBCXX_VERSION AND UNIX AND NOT APPLE) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # using Clang string(REPLACE "." "0" TBB_USE_GLIBCXX_VERSION ${CMAKE_CXX_COMPILER_VERSION}) - message(STATUS "TBB_USE_GLIBCXX_VERSION:${TBB_USE_GLIBCXX_VERSION}:") - - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # Do nothing using GCC - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") - # Do nothing when using Intel C++ - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - # Do nothgin when using Visual Studio C++ endif() endif() -if(TBB_USE_GLIBCXX_VERSION) - message(STATUS "ADDING: -DTBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION}") + +if (TBB_USE_GLIBCXX_VERSION) add_definitions(-DTBB_USE_GLIBCXX_VERSION=${TBB_USE_GLIBCXX_VERSION}) endif() ##------- +if (CMAKE_COMPILER_IS_GNUCC AND UNIX AND NOT APPLE) + add_definitions(-flifetime-dse=1) +endif() + # Linker export definitions if (APPLE) set (ARCH_PREFIX "mac") diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee97442 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +### Intel(R) Threading Building Blocks + +[![Build Status](https://travis-ci.org/wjakob/tbb.svg?branch=master)](https://travis-ci.org/wjakob/tbb) +[![Build status](https://ci.appveyor.com/api/projects/status/fvepmk5nxekq27r8?svg=true)](https://ci.appveyor.com/project/wjakob/tbb/branch/master) + +This is git repository is currently based on TBB 2017 and will be updated from +time to time to track the most recent release. The only modification is the +addition of a CMake-based build system. + +This is convenient for other projects that use CMake and TBB because TBB can be +easily incorporated into their build process using git submodules and a simple +``add_subdirectory`` command. + +Currently, the CMake-based build can create shared and static versions of +`libtbb`, `libtbbmalloc` and `libtbbmalloc_proxy` for the Intel `i386`/`x86_64` +architectures on Windows (Visual Studio, MinGW), MacOS (clang) and Linux (gcc). +Other combinations may work but have not been tested. + +See index.html for general directions and documentation regarding TBB. + +See examples/index.html for runnable examples and directions. + +See http://threadingbuildingblocks.org for full documentation +and software information. + +Note: Intel, Thread Building Blocks, and TBB are either registered trademarks or +trademarks of Intel Corporation in the United States and/or other countries.