early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

40
externals/vcpkg/ports/tbb/CMakeLists.txt vendored Executable file
View File

@@ -0,0 +1,40 @@
project(tbb CXX)
file(GLOB SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*)
file(COPY ${SOURCES} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/src)
include(${CMAKE_CURRENT_BINARY_DIR}/src/cmake/TBBBuild.cmake REQUIRED)
if(NOT BUILD_SHARED_LIBS)
set(TBB_STATIC_INCLUDE extra_inc=big_iron.inc)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(FORWARD_SDK_ROOT "SDKROOT=${CMAKE_OSX_SYSROOT}")
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(arch "arch=arm64")
endif()
endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
if(NOT CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL CMAKE_SYSTEM_PROCESSOR)
set(arch "arch=${CMAKE_SYSTEM_PROCESSOR}")
if(CMAKE_CXX_COMPILER)
set(CPLUS "CPLUS=${CMAKE_CXX_COMPILER}")
endif()
if(CMAKE_C_COMPILER)
set(CONLY "CONLY=${CMAKE_C_COMPILER}")
endif()
endif()
endif()
tbb_build(TBB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/src MAKE_ARGS ${arch} ${CPLUS} ${CONLY} ${TBB_STATIC_INCLUDE} ${FORWARD_SDK_ROOT})
set(SUBDIR ${CMAKE_CURRENT_BINARY_DIR}/tbb_cmake_build/tbb_cmake_build_subdir)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(SUBDIR "${SUBDIR}_release")
else()
set(SUBDIR "${SUBDIR}_debug")
endif()
file(GLOB OUTPUTS ${SUBDIR}/*.so.* ${SUBDIR}/*.so ${SUBDIR}/*.a ${SUBDIR}/*.dylib ${SUBDIR}/*.dylib.*)
install(FILES ${OUTPUTS} DESTINATION lib)

View File

@@ -0,0 +1,13 @@
diff --git a/src/tbb/cilk-tbb-interop.h b/src/tbb/cilk-tbb-interop.h
index 295734b..f35531e 100644
--- a/src/tbb/cilk-tbb-interop.h
+++ b/src/tbb/cilk-tbb-interop.h
@@ -29,6 +29,8 @@
#else
#ifdef IN_CILK_RUNTIME
#define CILK_EXPORT __declspec(dllexport)
+#elif defined(IN_CILK_STATIC)
+#define CILK_EXPORT /* nothing */
#else
#define CILK_EXPORT __declspec(dllimport)
#endif // IN_CILK_RUNTIME

138
externals/vcpkg/ports/tbb/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,138 @@
set(VCPKG_POLICY_MISMATCHED_NUMBER_OF_BINARIES enabled)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO oneapi-src/oneTBB
REF eca91f16d7490a8abfdee652dadf457ec820cc37 # 2020_U3
SHA512 7144e1dc68304b5358e6ea330431b6f0c61fadb147efa353a5b242777d6fabf7b8cf99b79cffb51b49b911dd17a9f1879619d6eebdf319f23ec3235c89cffc25
HEAD_REF tbb_2019
PATCHES
fix-static-build.patch
terminate-when-buildtool-notfound.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
if (NOT VCPKG_TARGET_IS_WINDOWS)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
)
vcpkg_install_cmake()
# Settings for TBBConfigInternal.cmake.in
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
set(TBB_LIB_EXT a)
else()
if (VCPKG_TARGET_IS_LINUX)
set(TBB_LIB_EXT "so.2")
elseif(VCPKG_TARGET_IS_OSX)
set(TBB_LIB_EXT "dylib")
else()
set(TBB_LIB_EXT "so")
endif()
endif()
set(TBB_LIB_PREFIX lib)
else()
if (VCPKG_CRT_LINKAGE STREQUAL static)
set(RELEASE_CONFIGURATION Release-MT)
set(DEBUG_CONFIGURATION Debug-MT)
else()
set(RELEASE_CONFIGURATION Release)
set(DEBUG_CONFIGURATION Debug)
endif()
macro(CONFIGURE_PROJ_FILE arg)
set(CONFIGURE_FILE_NAME ${arg})
set(CONFIGURE_BAK_FILE_NAME ${arg}.bak)
if (NOT EXISTS ${CONFIGURE_BAK_FILE_NAME})
configure_file(${CONFIGURE_FILE_NAME} ${CONFIGURE_BAK_FILE_NAME} COPYONLY)
endif()
configure_file(${CONFIGURE_BAK_FILE_NAME} ${CONFIGURE_FILE_NAME} COPYONLY)
file(READ ${CONFIGURE_FILE_NAME} SLN_CONFIGURE)
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
string(REPLACE "<ConfigurationType>DynamicLibrary<\/ConfigurationType>"
"<ConfigurationType>StaticLibrary<\/ConfigurationType>" SLN_CONFIGURE "${SLN_CONFIGURE}")
string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE"
"\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_STATIC" SLN_CONFIGURE "${SLN_CONFIGURE}")
else()
string(REPLACE "\/D_CRT_SECURE_NO_DEPRECATE"
"\/D_CRT_SECURE_NO_DEPRECATE \/DIN_CILK_RUNTIME" SLN_CONFIGURE "${SLN_CONFIGURE}")
endif()
file(WRITE ${CONFIGURE_FILE_NAME} "${SLN_CONFIGURE}")
endmacro()
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbb.vcxproj)
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc.vcxproj)
CONFIGURE_PROJ_FILE(${SOURCE_PATH}/build/vs2013/tbbmalloc_proxy.vcxproj)
vcpkg_install_msbuild(
SOURCE_PATH ${SOURCE_PATH}
PROJECT_SUBPATH build/vs2013/makefile.sln
RELEASE_CONFIGURATION ${RELEASE_CONFIGURATION}
DEBUG_CONFIGURATION ${DEBUG_CONFIGURATION}
)
# Settings for TBBConfigInternal.cmake.in
set(TBB_LIB_EXT lib)
set(TBB_LIB_PREFIX)
endif()
file(COPY
${SOURCE_PATH}/include/tbb
${SOURCE_PATH}/include/serial
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
# Settings for TBBConfigInternal.cmake.in
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc)
else()
set(TBB_DEFAULT_COMPONENTS tbb tbbmalloc tbbmalloc_proxy)
endif()
file(READ "${SOURCE_PATH}/include/tbb/tbb_stddef.h" _tbb_stddef)
string(REGEX REPLACE ".*#define TBB_VERSION_MAJOR ([0-9]+).*" "\\1" _tbb_ver_major "${_tbb_stddef}")
string(REGEX REPLACE ".*#define TBB_VERSION_MINOR ([0-9]+).*" "\\1" _tbb_ver_minor "${_tbb_stddef}")
string(REGEX REPLACE ".*#define TBB_INTERFACE_VERSION ([0-9]+).*" "\\1" TBB_INTERFACE_VERSION "${_tbb_stddef}")
set(TBB_VERSION "${_tbb_ver_major}.${_tbb_ver_minor}")
set(TBB_RELEASE_DIR "\${_tbb_root}/lib")
set(TBB_DEBUG_DIR "\${_tbb_root}/debug/lib")
configure_file(
${SOURCE_PATH}/cmake/templates/TBBConfigInternal.cmake.in
${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake
@ONLY
)
configure_file(
${SOURCE_PATH}/cmake/templates/TBBConfigVersion.cmake.in
${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfigVersion.cmake
@ONLY
)
file(READ ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake _contents)
string(REPLACE
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)"
"get_filename_component(_tbb_root \"\${_tbb_root}\" PATH)\nget_filename_component(_tbb_root \"\${_tbb_root}\" PATH)"
_contents
"${_contents}"
)
string(REPLACE
"set(_tbb_release_lib \"/${TBB_LIB_PREFIX}"
"set(_tbb_release_lib \"\${_tbb_root}/lib/${TBB_LIB_PREFIX}"
_contents
"${_contents}"
)
string(REPLACE
"set(_tbb_debug_lib \"/${TBB_LIB_PREFIX}"
"set(_tbb_debug_lib \"\${_tbb_root}/debug/lib/${TBB_LIB_PREFIX}"
_contents
"${_contents}"
)
string(REPLACE "SHARED IMPORTED)" "UNKNOWN IMPORTED)" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/tbb/TBBConfig.cmake "${_contents}")
file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/tbb)
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@@ -0,0 +1,13 @@
diff --git a/cmake/TBBBuild.cmake b/cmake/TBBBuild.cmake
index a2222e3..756d85c 100644
--- a/cmake/TBBBuild.cmake
+++ b/cmake/TBBBuild.cmake
@@ -158,7 +158,7 @@ function(tbb_build)
mark_as_advanced(TBB_MAKE_TOOL)
if (NOT TBB_MAKE_TOOL)
- message(STATUS "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found")
+ message(FATAL_ERROR "Intel TBB can not be built: required make-tool (${make_tool_name}) was not found")
set(${tbb_build_CONFIG_DIR} ${tbb_build_CONFIG_DIR}-NOTFOUND PARENT_SCOPE)
return()
endif()

4
externals/vcpkg/ports/tbb/usage vendored Executable file
View File

@@ -0,0 +1,4 @@
The package tbb provides CMake targets:
find_package(TBB CONFIG REQUIRED)
target_link_libraries(main PRIVATE TBB::tbb)

8
externals/vcpkg/ports/tbb/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,8 @@
{
"name": "tbb",
"version-string": "2020_U3",
"port-version": 8,
"description": "Intel's Threading Building Blocks.",
"homepage": "https://github.com/01org/tbb",
"supports": "!(uwp | arm | arm64) | linux | osx"
}