armv7 (32-bit) & aarch64 support, minor cmake tweaks

This commit is contained in:
Wenzel Jakob
2017-08-23 22:08:04 +02:00
parent 2e1759a5ef
commit 43c595a21d
2 changed files with 21 additions and 12 deletions
+17 -11
View File
@@ -63,8 +63,10 @@ set(tbbmalloc_proxy_src
src/tbbmalloc/proxy.cpp
src/tbbmalloc/tbb_function_replacement.cpp)
if (NOT APPLE AND NOT MINGW)
add_definitions(-DDO_ITT_NOTIFY)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "(i386|x86_64)")
if (NOT APPLE AND NOT MINGW)
add_definitions(-DDO_ITT_NOTIFY)
endif()
endif()
if (APPLE)
@@ -85,15 +87,19 @@ macro(CHECK_CXX_COMPILER_AND_LINKER_FLAGS _RESULT _CXX_FLAGS _LINKER_FLAGS)
endmacro()
# Prefer libc++ in conjunction with Clang
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+")
CHECK_CXX_COMPILER_AND_LINKER_FLAGS(HAS_LIBCPP "-stdlib=libc++" "-stdlib=libc++")
if (HAS_LIBCPP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -D_LIBCPP_VERSION")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_FLAGS MATCHES "-stdlib=libc\\+\\+")
message(STATUS "TBB: using libc++.")
else()
message(STATUS "TBB: NOT using libc++.")
CHECK_CXX_COMPILER_AND_LINKER_FLAGS(HAS_LIBCPP "-stdlib=libc++" "-stdlib=libc++")
if (HAS_LIBCPP)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++ -D_LIBCPP_VERSION")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")
message(STATUS "TBB: using libc++.")
else()
message(STATUS "TBB: NOT using libc++.")
endif()
endif()
endif()
@@ -180,9 +186,9 @@ if (APPLE)
set (ARCH_PREFIX "mac")
elseif(WIN32)
set (ARCH_PREFIX "win")
else ()
else()
set (ARCH_PREFIX "lin")
endif ()
endif()
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
set(ARCH_PREFIX "${ARCH_PREFIX}64")
+4 -1
View File
@@ -16,7 +16,10 @@ easily incorporated into their build process using git submodules and a simple
Currently, the CMake-based build can create shared and static versions of
`libtbb`, `libtbbmalloc` and `libtbbmalloc_proxy` for the Intel `i386` and
`x86_64` architectures on Windows (Visual Studio, MinGW), MacOS (clang) and
Linux (gcc). Other combinations may work but have not been tested.
Linux (gcc). The `armv7` and `aarch_64` architectures have been tested with GCC
& Clang.
Other combinations may work but have not been tested.
See index.html for general directions and documentation regarding TBB.