[EAThread][EASTL] Added EAThread and modified EASTL (#8861)

* [EAThread][EASTL] Added EAThread and modified EASTL

EABase has now also been seperated from EASTL.
EASTL now copies CommonCppFlags.cmake as it is used by EAThread.

* Fix EABase

* Fix EABASE include for EASTL

* Improve EASTL

Still need to fix
The /debug/lib/cmake folder should be merged with /lib/cmake into /share/eastl
Found 3 error(s). Please correct the portfile:
    E:\vcpkg\ports\eastl\portfile.cmake
-- Performing post-build validation done
Error: Building package eastl:x64-windows-static failed with: POST_BUILD_CHECKS_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
  Package: eastl:x64-windows-static
  Vcpkg version: 2019.09.12-nohash

* Base pass one Thread

* Fix config errors and add `vcpkg_fixup_cmake_targets`

* Add required changes for fails

* x86-windows should also fail

* Revert adding `vcpkg_fail_port_install(ON_TARGET "Windows" ...)`

* Remove `eastl:arm64-windows=fail` from ci.baseline.txt

* Merge CONTROL descriptions into one line
This commit is contained in:
Oliver John Hitchcock 2020-02-04 22:10:03 +00:00 committed by GitHub
parent 0591528cbf
commit ed863b163c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 318 additions and 45 deletions

4
ports/eabase/CONTROL Normal file
View File

@ -0,0 +1,4 @@
Source: eabase
Version: 2.09.10
Homepage: https://github.com/electronicarts/EABase
Description: Electronic Arts Base. EABase is a small set of header files that define platform-independent data types and macros.

View File

@ -0,0 +1,6 @@
@PACKAGE_INIT@
# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
include(${CMAKE_CURRENT_LIST_DIR}/EABaseTargets.cmake)

View File

@ -0,0 +1,75 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89c6703..ab8e553 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@
cmake_minimum_required(VERSION 3.1)
project(EABase CXX)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
#-------------------------------------------------------------------------------------------
# Options
#-------------------------------------------------------------------------------------------
@@ -22,13 +25,51 @@ endif()
add_definitions(-D_CHAR16T)
if (NOT EABASE_BUILD_TESTS)
- #-------------------------------------------------------------------------------------------
- # Header only library
- #-------------------------------------------------------------------------------------------
- add_library(EABase INTERFACE)
-
- #-------------------------------------------------------------------------------------------
- # Include dirs
- #-------------------------------------------------------------------------------------------
- target_include_directories(EABase INTERFACE include/Common)
+ #-------------------------------------------------------------------------------------------
+ # Header only library
+ #-------------------------------------------------------------------------------------------
+ add_library(EABase INTERFACE)
+ add_library(EABase::EABase ALIAS EABase)
+
+ #-------------------------------------------------------------------------------------------
+ # Include dirs
+ #-------------------------------------------------------------------------------------------
+ target_include_directories(EABase INTERFACE
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include/Common>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/Common>
+ )
+
+ # create and install an export set for eabase target as EABase::EABase
+ set(EABase_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EABase")
+
+ configure_package_config_file(
+ EABaseConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake
+ INSTALL_DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION}
+ )
+
+ # create and install an export set for Terra target as Terra
+ install(
+ TARGETS EABase EXPORT EABaseTargets
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ )
+
+
+ install(EXPORT EABaseTargets DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION})
+
+ write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake"
+ VERSION 2.09.10
+ COMPATIBILITY SameMajorVersion
+ )
+
+ install(TARGETS EABase LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+ install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+
+ install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/EABaseConfigVersion.cmake"
+ DESTINATION ${EABase_CMAKE_CONFIG_DESTINATION}
+ )
endif()

View File

@ -0,0 +1,30 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO electronicarts/EABase
REF edbafca82e4c4e73302e0b5144c5d1f4710db9fa
SHA512 fb9bd07602fb308864506737813212e47385a164708cd9064fdd4d1893294b228718a2964a0b16d04483f4f4c8a156f7199b60f227e4fc9ac88352f7dcd59672
HEAD_REF master
PATCHES
fix_cmake_install.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/EABaseConfig.cmake.in DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DEABASE_BUILD_TESTS:BOOL=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EABase)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug ${CURRENT_PACKAGES_DIR}/lib)
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,5 +1,5 @@
Source: eastl
Version: 3.14.01
Version: 3.16.01
Homepage: https://github.com/electronicarts/EASTL
Description: Electronic Arts Standard Template Library.
It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.
Description: Electronic Arts Standard Template Library. It is a C++ template library of containers, algorithms, and iterators useful for runtime and tool development across multiple platforms. It is a fairly extensive and robust implementation of such a library and has an emphasis on high performance above all other considerations.
Build-Depends: eabase

View File

@ -0,0 +1,6 @@
@PACKAGE_INIT@
# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
include(${CMAKE_CURRENT_LIST_DIR}/EASTLTargets.cmake)

View File

@ -1,19 +1,71 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b8171cd..c771e77 100644
index b8171cd..44120cc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,7 @@ add_definitions(-DEASTL_OPENSOURCE=1)
@@ -4,12 +4,17 @@
cmake_minimum_required(VERSION 3.1)
project(EASTL CXX)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
#-------------------------------------------------------------------------------------------
# Options
#-------------------------------------------------------------------------------------------
option(EASTL_BUILD_BENCHMARK "Enable generation of build files for benchmark" OFF)
option(EASTL_BUILD_TESTS "Enable generation of build files for tests" OFF)
+find_package(EABase CONFIG REQUIRED)
+
#-------------------------------------------------------------------------------------------
# Compiler Flags
#-------------------------------------------------------------------------------------------
@@ -41,10 +46,46 @@ add_definitions(-DEASTL_OPENSOURCE=1)
#-------------------------------------------------------------------------------------------
# Include dirs
#-------------------------------------------------------------------------------------------
+include_directories(APPEND test/packages)
target_include_directories(EASTL PUBLIC include)
-target_include_directories(EASTL PUBLIC include)
+target_include_directories(EASTL PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ )
#-------------------------------------------------------------------------------------------
@@ -48,3 +49,6 @@ target_include_directories(EASTL PUBLIC include)
# Dependencies
#-------------------------------------------------------------------------------------------
target_link_libraries(EASTL EABase)
-target_link_libraries(EASTL EABase)
+target_link_libraries(EASTL PUBLIC EABase)
+
+# create and install an export set for eabase target as EABase::EABase
+set(EASTL_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EASTL")
+
+configure_package_config_file(
+ EASTLConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake
+ INSTALL_DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION}
+)
+
+# create and install an export set for Terra target as Terra
+install(
+ TARGETS EASTL EXPORT EASTLTargets
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+
+install(EXPORT EASTLTargets DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION})
+
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake"
+ VERSION 3.16.01
+ COMPATIBILITY SameMajorVersion
+)
+
+install(TARGETS EASTL LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(TARGETS EASTL DESTINATION lib)
+install(DIRECTORY include/EASTL DESTINATION include)
+install(DIRECTORY test/packages/EABase DESTINATION include)
+install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/EASTLConfigVersion.cmake"
+ DESTINATION ${EASTL_CMAKE_CONFIG_DESTINATION}
+)

View File

@ -1,13 +0,0 @@
diff --git a/include/Common/EABase/config/eaplatform.h b/include/Common/EABase/config/eaplatform.h
index 8b16146..54079ab 100644
--- a/include/Common/EABase/config/eaplatform.h
+++ b/include/Common/EABase/config/eaplatform.h
@@ -125,7 +125,7 @@
#endif
-#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE))
+#elif defined(EA_PLATFORM_XBOXONE) || defined(_DURANGO) || defined(EA_PLATFORM_CAPILANO) || (defined(WINAPI_FAMILY) && WINAPI_FAMILY && (WINAPI_FAMILY == WINAPI_FAMILY_GAMES || WINAPI_FAMILY == WINAPI_FAMILY_TV_TITLE))
// XBox One
// Durango was Microsoft's code-name for the platform, which is now obsolete.
// Microsoft uses _DURANGO instead of some variation of _XBOX, though it's not natively defined by the compiler.

View File

@ -1,30 +1,16 @@
include(vcpkg_common_functions)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO electronicarts/EABase
REF 6f27a2f7aa21f2d71ae8c6bc1d889d0119677a56
SHA512 9176fb2d508cf023c3c16c61a511196a2f6af36172145544bba44062a00ca7591e54e4fc16ac13562ef0e2d629b626f398bff3669b4cdb7ba0068548d6a53883
HEAD_REF master
PATCHES
fix_uwp.patch
)
set(EABASE_PATH ${SOURCE_PATH})
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO electronicarts/EASTL
REF 3.14.01
SHA512 efc03bdd4b6371b3fb4b75cac31ce3081290e9177453914a4fbb601d1ba44d65a86f2e98b7b27efbd985f37bd59a80169cf58beb3a32e5b3672ea2a2d6dd78d1
REF 3.16.01
SHA512 c5c4b6637da5257e6dbbccd293a07691d509bf1310a67aa8b85777a1163f0034874e0638728a54deaa0839320fd919b67a8c9e22461fee6612a76637bb3086bc
HEAD_REF master
PATCHES
fix_cmake_install.patch
)
file(COPY ${EABASE_PATH}/include/Common/EABase/ DESTINATION ${SOURCE_PATH}/test/packages/EABase)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/EASTLConfig.cmake.in DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
@ -36,10 +22,15 @@ vcpkg_configure_cmake(
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EASTL)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl RENAME copyright)
file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eastl)
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
# CommonCppFlags used by EAThread
file(INSTALL ${SOURCE_PATH}/scripts/CMake/CommonCppFlags.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})

5
ports/eathread/CONTROL Normal file
View File

@ -0,0 +1,5 @@
Source: eathread
Version: 1.32.09
Homepage: https://github.com/electronicarts/EAThread
Description: Electronic Arts Thread Library. EAThread implements a unified cross-platform interface for multithreaded programming on various platforms.
Build-Depends: eabase, eastl

View File

@ -0,0 +1,6 @@
@PACKAGE_INIT@
# Provide path for scripts
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
include(${CMAKE_CURRENT_LIST_DIR}/EAThreadTargets.cmake)

View File

@ -0,0 +1,75 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34fc37a..60d201a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,15 +4,21 @@
cmake_minimum_required(VERSION 3.1)
project(EAThread CXX)
+include(GNUInstallDirs)
+include(CMakePackageConfigHelpers)
+
#-------------------------------------------------------------------------------------------
# Options
#-------------------------------------------------------------------------------------------
option(EATHREAD_BUILD_TESTS "Enable generation of build files for tests" OFF)
+find_package(EABase CONFIG REQUIRED)
+find_package(EASTL CONFIG REQUIRED)
+
#-------------------------------------------------------------------------------------------
# Compiler Flags
#-------------------------------------------------------------------------------------------
-set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_CURRENT_SOURCE_DIR}/test/packages/EASTL/scripts/CMake")
+set (CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${_VCPKG_ROOT_DIR}/installed/${VCPKG_TARGET_TRIPLET}/share/eastl")
include(CommonCppFlags)
#-------------------------------------------------------------------------------------------
@@ -34,10 +40,45 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
#-------------------------------------------------------------------------------------------
# Export Include Directories
#-------------------------------------------------------------------------------------------
-target_include_directories(EAThread PUBLIC include)
+target_include_directories(EAThread PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
+ )
#-------------------------------------------------------------------------------------------
# Package Dependencies
#-------------------------------------------------------------------------------------------
-target_link_libraries(EAThread EABase)
+target_link_libraries(EAThread PUBLIC EABase)
+
+# create and install an export set for eabase target as EABase::EABase
+set(EAThread_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/EAThread")
+
+configure_package_config_file(
+ EAThreadConfig.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfig.cmake
+ INSTALL_DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION}
+)
+
+# create and install an export set for Terra target as Terra
+install(
+ TARGETS EAThread EXPORT EAThreadTargets
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+
+install(EXPORT EAThreadTargets DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION})
+
+write_basic_package_version_file(
+ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfigVersion.cmake"
+ VERSION 3.16.01
+ COMPATIBILITY SameMajorVersion
+)
+
+install(TARGETS EAThread LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+install(DIRECTORY "include/" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(
+ FILES
+ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfig.cmake"
+ "${CMAKE_CURRENT_BINARY_DIR}/EAThreadConfigVersion.cmake"
+ DESTINATION ${EAThread_CMAKE_CONFIG_DESTINATION}
+)

View File

@ -0,0 +1,33 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_fail_port_install(ON_TARGET "UWP" ON_ARCH "arm" "arm64")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO electronicarts/EAThread
REF e4367a36f2e55d10b2b994bfbae8edf21f15bafd
SHA512 cd5a2aa6cdfe6fa538067919aa49e5ecd901898e12929dc852068ce66efe386032eb1fe667ea7d9b7a3d73a7bef1d90a683c0b90b6fb0d6d9a27950b05c4ab6a
HEAD_REF master
PATCHES
fix_cmake_install.patch
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/EAThreadConfig.cmake.in DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS
-DEATHREAD_BUILD_TESTS=OFF
)
vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/EAThread)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
vcpkg_copy_pdbs()
# Handle copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/eathread RENAME copyright)
file(INSTALL ${SOURCE_PATH}/3RDPARTYLICENSES.TXT DESTINATION ${CURRENT_PACKAGES_DIR}/share/eathread)

View File

@ -380,7 +380,6 @@ dxut:arm-uwp=fail
dxut:x64-linux=fail
dxut:x64-osx=fail
dxut:x64-windows-static=fail
eastl:arm64-windows=fail
eastl:arm-uwp=fail
easyhook:arm64-windows=fail
easyhook:arm-uwp=fail
@ -390,6 +389,10 @@ easyhook:x64-uwp=fail
easyhook:x64-windows-static=fail
easyloggingpp:arm-uwp=fail
easyloggingpp:x64-uwp=fail
eathread:arm64-windows=fail
eathread:arm-uwp=fail
eathread:x64-uwp=fail
eathread:x86-windows=fail
ebml:arm-uwp=fail
ebml:x64-uwp=fail
ecm:arm64-windows = skip