Initial commit
This commit is contained in:
101
eastl/all/conandata.yml
Normal file
101
eastl/all/conandata.yml
Normal file
@@ -0,0 +1,101 @@
|
||||
sources:
|
||||
"3.27.01":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/refs/tags/3.27.01.tar.gz"
|
||||
sha256: "fce43bf443f5569b00a8deae735394ea0b16f6c3f96867a17ded50775ffcdd12"
|
||||
"3.27.00":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/refs/tags/3.27.00.tar.gz"
|
||||
sha256: "5606643e41ab12fd7c209755fe04dca581ed01f43dec515288b1544eea22623f"
|
||||
"3.21.23":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/refs/tags/3.21.23.tar.gz"
|
||||
sha256: "2bcb48f88f7daf9f91c165aae751c10d11d6959b6e10f2dda8f1db893e684022"
|
||||
"3.21.12":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/refs/tags/3.21.12.tar.gz"
|
||||
sha256: "2a4d77e5eda23ec52fea8b22abbf2ea8002f38396d2a3beddda3ff2e17f7db2e"
|
||||
"3.18.00":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/refs/tags/3.18.00.tar.gz"
|
||||
sha256: "a3c5b970684be02e81fb16fbf92ed2584e055898704fde87c72d0331afdea12b"
|
||||
"3.17.06":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/3.17.06.tar.gz"
|
||||
sha256: "9ebeef26cdf091877ee348450d2711cd0bb60ae435309126c0adf8fec9a01ea5"
|
||||
"3.17.03":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/3.17.03.tar.gz"
|
||||
sha256: "50a072066e30fda364d482df6733572d8ca440a33825d81254b59a6ca9f4375a"
|
||||
"3.16.07":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/3.16.07.tar.gz"
|
||||
sha256: "f997a81c8cb36618bd4526ea7a02d026c8111d15fbc138c67ba8f4606680d551"
|
||||
"3.16.05":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/3.16.05.tar.gz"
|
||||
sha256: "deebff248ec0d4da35ca006cec39abdcfe65ccbd7294f6fbdb42fc92232368b6"
|
||||
"3.16.01":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/3.16.01.tar.gz"
|
||||
sha256: "80b0754ea02364dfd3f94e3b65c93087849a8d407196702c0cae59097fbe8d21"
|
||||
"3.15.00":
|
||||
url: "https://github.com/electronicarts/EASTL/archive/3.15.00.tar.gz"
|
||||
sha256: "1578a2935ca490920b96c960fb570dab025280bb978fba40c88eb9ac74760c14"
|
||||
patches:
|
||||
"3.27.01":
|
||||
- patch_file: "patches/3.27.01-0001-use-conan.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
- patch_file: "patches/3.27.01-0002-fix-assert-unused.patch"
|
||||
patch_description: "disable warning for unused parameter inside assert file"
|
||||
patch_type: "conan"
|
||||
"3.27.00":
|
||||
- patch_file: "patches/3.27.00-0001-use-conan.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
- patch_file: "patches/3.27.00-0002-fix-assert-unused.patch"
|
||||
patch_description: "disable warning for unused parameter inside assert file"
|
||||
patch_type: "conan"
|
||||
"3.21.23":
|
||||
- patch_file: "patches/3.21.23-0001-use-conan.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
"3.21.12":
|
||||
- patch_file: "patches/3.21.12-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
- patch_file: "patches/3.17.03-0002-revert-c++14-constexpr.patch"
|
||||
patch_description: "disable constexpr for unsupported compilers"
|
||||
patch_type: "portability"
|
||||
- patch_file: "patches/3.21.12-0003-rename_reference.patch"
|
||||
patch_description: "use eastl::remove_reference instead of std::remove_reference"
|
||||
patch_type: "portability"
|
||||
patch_source: "https://github.com/electronicarts/EASTL/issues/512"
|
||||
"3.18.00":
|
||||
- patch_file: "patches/3.17.03-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
- patch_file: "patches/3.17.03-0002-revert-c++14-constexpr.patch"
|
||||
patch_description: "disable constexpr for unsupported compilers"
|
||||
patch_type: "portability"
|
||||
"3.17.06":
|
||||
- patch_file: "patches/3.17.03-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
- patch_file: "patches/3.17.03-0002-revert-c++14-constexpr.patch"
|
||||
patch_description: "disable constexpr for unsupported compilers"
|
||||
patch_type: "portability"
|
||||
"3.17.03":
|
||||
- patch_file: "patches/3.17.03-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
- patch_file: "patches/3.17.03-0002-revert-c++14-constexpr.patch"
|
||||
patch_description: "disable constexpr for unsupported compilers"
|
||||
patch_type: "portability"
|
||||
"3.16.07":
|
||||
- patch_file: "patches/3.15.00-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
"3.16.05":
|
||||
- patch_file: "patches/3.15.00-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
"3.16.01":
|
||||
- patch_file: "patches/3.15.00-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
"3.15.00":
|
||||
- patch_file: "patches/3.15.00-0001-cmake-shared-use-conan-add-install.patch"
|
||||
patch_description: "support shared build, use cci's EABase, add install definitions"
|
||||
patch_type: "conan"
|
||||
152
eastl/all/conanfile.py
Normal file
152
eastl/all/conanfile.py
Normal file
@@ -0,0 +1,152 @@
|
||||
import os
|
||||
|
||||
from conan import ConanFile
|
||||
from conan.errors import ConanInvalidConfiguration
|
||||
from conan.tools.build import check_min_cppstd
|
||||
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
|
||||
from conan.tools.files import (
|
||||
apply_conandata_patches,
|
||||
copy,
|
||||
export_conandata_patches,
|
||||
get,
|
||||
replace_in_file,
|
||||
rmdir,
|
||||
)
|
||||
from conan.tools.microsoft import is_msvc, check_min_vs
|
||||
from conan.tools.scm import Version
|
||||
|
||||
required_conan_version = ">=1.52.0"
|
||||
|
||||
|
||||
class EastlConan(ConanFile):
|
||||
name = "eastl"
|
||||
description = (
|
||||
"EASTL stands for Electronic Arts Standard Template Library. "
|
||||
"It is an extensive and robust implementation that has an "
|
||||
"emphasis on high performance."
|
||||
)
|
||||
topics = ("eastl", "stl", "high-performance")
|
||||
license = "BSD-3-Clause"
|
||||
url = "https://github.com/conan-io/conan-center-index"
|
||||
homepage = "https://github.com/electronicarts/EASTL"
|
||||
|
||||
package_type = "library"
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
options = {
|
||||
"shared": [True, False],
|
||||
"fPIC": [True, False],
|
||||
}
|
||||
default_options = {
|
||||
"shared": False,
|
||||
"fPIC": True,
|
||||
}
|
||||
|
||||
@property
|
||||
def _min_cppstd(self):
|
||||
if Version(self.version) < "3.27.00":
|
||||
return 14
|
||||
else:
|
||||
return 17
|
||||
|
||||
@property
|
||||
def _compilers_minimum_version(self):
|
||||
return {
|
||||
"Visual Studio": "14",
|
||||
"msvc": "190",
|
||||
"gcc": "5" if Version(self.version) < "3.21.12" else "6",
|
||||
"clang": "3.2",
|
||||
"apple-clang": "4.3",
|
||||
}
|
||||
|
||||
def export_sources(self):
|
||||
export_conandata_patches(self)
|
||||
|
||||
def config_options(self):
|
||||
if self.settings.os == "Windows":
|
||||
del self.options.fPIC
|
||||
|
||||
def configure(self):
|
||||
if self.options.shared:
|
||||
self.options.rm_safe("fPIC")
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self, src_folder="src")
|
||||
|
||||
def requirements(self):
|
||||
if self.version >= "3.27.00":
|
||||
self.requires("eabase/01082025", transitive_headers=True)
|
||||
elif self.version == "3.21.23":
|
||||
self.requires("eabase/18082024", transitive_headers=True)
|
||||
else:
|
||||
self.requires("eabase/2.09.12", transitive_headers=True)
|
||||
|
||||
def validate(self):
|
||||
if self.settings.compiler.get_safe("cppstd"):
|
||||
check_min_cppstd(self, self._min_cppstd)
|
||||
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
|
||||
if minimum_version and Version(self.settings.compiler.version) < minimum_version:
|
||||
raise ConanInvalidConfiguration(
|
||||
f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support."
|
||||
)
|
||||
|
||||
if is_msvc(self) and check_min_vs(self, "193", raise_invalid=False) and Version(self.version) < "3.21.12":
|
||||
raise ConanInvalidConfiguration(f"{self.ref} is not compatible with Visual Studio 2022, please use version >= 3.21.12")
|
||||
|
||||
def source(self):
|
||||
get(self, **self.conan_data["sources"][self.version], strip_root=True)
|
||||
|
||||
def generate(self):
|
||||
tc = CMakeToolchain(self)
|
||||
tc.variables["EASTL_BUILD_BENCHMARK"] = False
|
||||
tc.variables["EASTL_BUILD_TESTS"] = False
|
||||
tc.variables["CMAKE_CXX_STANDARD"] = self._min_cppstd
|
||||
tc.generate()
|
||||
CMakeDeps(self).generate()
|
||||
|
||||
def _patch_sources(self):
|
||||
apply_conandata_patches(self)
|
||||
replace_in_file(
|
||||
self,
|
||||
os.path.join(self.source_folder, "CMakeLists.txt"),
|
||||
"include(CommonCppFlags)",
|
||||
"",
|
||||
)
|
||||
|
||||
def build(self):
|
||||
self._patch_sources()
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def package(self):
|
||||
copy(
|
||||
self,
|
||||
"LICENSE",
|
||||
src=self.source_folder,
|
||||
dst=os.path.join(self.package_folder, "licenses"),
|
||||
)
|
||||
copy(
|
||||
self,
|
||||
"3RDPARTYLICENSES.TXT",
|
||||
src=self.source_folder,
|
||||
dst=os.path.join(self.package_folder, "licenses"),
|
||||
)
|
||||
cmake = CMake(self)
|
||||
cmake.install()
|
||||
rmdir(self, os.path.join(self.package_folder, "doc"))
|
||||
|
||||
def package_info(self):
|
||||
self.cpp_info.libs = ["EASTL"]
|
||||
if self.settings.os in ["Linux", "FreeBSD"]:
|
||||
self.cpp_info.system_libs.extend(["m", "pthread"])
|
||||
if self.options.shared:
|
||||
self.cpp_info.defines.append("EA_DLL")
|
||||
|
||||
self.cpp_info.set_property("cmake_file_name", "EASTL")
|
||||
self.cpp_info.set_property("cmake_target_name", "EASTL::EASTL")
|
||||
|
||||
# TODO: to remove in conan v2 once cmake_find_package_* generators removed
|
||||
self.cpp_info.filenames["cmake_find_package"] = "EASTL"
|
||||
self.cpp_info.filenames["cmake_find_package_multi"] = "EASTL"
|
||||
self.cpp_info.names["cmake_find_package"] = "EASTL"
|
||||
self.cpp_info.names["cmake_find_package_multi"] = "EASTL"
|
||||
@@ -0,0 +1,23 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -46,5 +46,19 @@ target_include_directories(EASTL PUBLIC include)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------------------
|
||||
-target_link_libraries(EASTL EABase)
|
||||
+find_package(EABase REQUIRED CONFIG)
|
||||
+target_link_libraries(EASTL EABase::EABase)
|
||||
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
|
||||
+ if(MSVC OR CYGWIN)
|
||||
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS EASTL
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)
|
||||
@@ -0,0 +1,27 @@
|
||||
--- CMakeLists.txt
|
||||
+++ CMakeLists.txt
|
||||
@@ -47,8 +47,22 @@
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------------------
|
||||
if (NOT TARGET EABase)
|
||||
- add_subdirectory(test/packages/EABase)
|
||||
+ #add_subdirectory(test/packages/EABase)
|
||||
endif()
|
||||
|
||||
-target_link_libraries(EASTL EABase)
|
||||
+find_package(EABase REQUIRED CONFIG)
|
||||
+target_link_libraries(EASTL EABase::EABase)
|
||||
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
|
||||
+ if(MSVC OR CYGWIN)
|
||||
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
|
||||
+ endif()
|
||||
+endif()
|
||||
+
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS EASTL
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)
|
||||
18
eastl/all/patches/3.17.03-0002-revert-c++14-constexpr.patch
Normal file
18
eastl/all/patches/3.17.03-0002-revert-c++14-constexpr.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- include/EASTL/internal/config.h
|
||||
+++ include/EASTL/internal/config.h
|
||||
@@ -143,7 +143,14 @@
|
||||
// http://en.wikipedia.org/wiki/C%2B%2B14#Relaxed_constexpr_restrictions
|
||||
//
|
||||
#if !defined(EA_CPP14_CONSTEXPR)
|
||||
- #if defined(EA_COMPILER_CPP14_ENABLED)
|
||||
+
|
||||
+ #if defined(EA_COMPILER_MSVC_2015)
|
||||
+ #define EA_CPP14_CONSTEXPR // not supported
|
||||
+ #define EA_NO_CPP14_CONSTEXPR
|
||||
+ #elif defined(__GNUC__) && (EA_COMPILER_VERSION < 9000) // Before GCC 9.0
|
||||
+ #define EA_CPP14_CONSTEXPR // not supported
|
||||
+ #define EA_NO_CPP14_CONSTEXPR
|
||||
+ #elif defined(EA_COMPILER_CPP14_ENABLED)
|
||||
#define EA_CPP14_CONSTEXPR constexpr
|
||||
#else
|
||||
#define EA_CPP14_CONSTEXPR // not supported
|
||||
@@ -0,0 +1,30 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index e3eb444..f033794 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -59,11 +59,22 @@ target_include_directories(EASTL PUBLIC include)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------------------
|
||||
-if (NOT TARGET EABase)
|
||||
- add_subdirectory(test/packages/EABase)
|
||||
+find_package(EABase REQUIRED CONFIG)
|
||||
+target_link_libraries(EASTL EABase::EABase)
|
||||
+
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
|
||||
+ if(MSVC OR CYGWIN)
|
||||
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
-target_link_libraries(EASTL EABase)
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS EASTL
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)
|
||||
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Installation
|
||||
13
eastl/all/patches/3.21.12-0003-rename_reference.patch
Normal file
13
eastl/all/patches/3.21.12-0003-rename_reference.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/include/EASTL/internal/type_transformations.h b/include/EASTL/internal/type_transformations.h
|
||||
index 5454cfa..54a1c14 100644
|
||||
--- a/include/EASTL/internal/type_transformations.h
|
||||
+++ b/include/EASTL/internal/type_transformations.h
|
||||
@@ -497,7 +497,7 @@ namespace eastl
|
||||
namespace internal
|
||||
{
|
||||
template <typename T>
|
||||
- auto try_add_pointer(int) -> type_identity<typename std::remove_reference<T>::type*>;
|
||||
+ auto try_add_pointer(int) -> type_identity<typename eastl::remove_reference<T>::type*>;
|
||||
template <typename T>
|
||||
auto try_add_pointer(...) -> type_identity<T>;
|
||||
}
|
||||
42
eastl/all/patches/3.21.23-0001-use-conan.patch
Normal file
42
eastl/all/patches/3.21.23-0001-use-conan.patch
Normal file
@@ -0,0 +1,42 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,16 +70,15 @@ target_include_directories(EASTL PUBLIC include)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------------------
|
||||
-FetchContent_Declare(
|
||||
- EABase
|
||||
- GIT_REPOSITORY https://github.com/electronicarts/EABase.git
|
||||
- GIT_TAG 123363eb82e132c0181ac53e43226d8ee76dea12
|
||||
- GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase.
|
||||
-)
|
||||
-
|
||||
-FetchContent_MakeAvailable(EABase)
|
||||
-
|
||||
-target_link_libraries(EASTL EABase)
|
||||
+find_package(EABase REQUIRED CONFIG)
|
||||
+target_link_libraries(EASTL EABase::EABase)
|
||||
+
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
|
||||
+ if(MSVC OR CYGWIN)
|
||||
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
|
||||
+ endif()
|
||||
+endif()
|
||||
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Deprecations
|
||||
@@ -98,6 +97,13 @@ endif()
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Installation
|
||||
#-------------------------------------------------------------------------------------------
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS EASTL
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)
|
||||
+
|
||||
install(TARGETS EASTL DESTINATION lib)
|
||||
install(DIRECTORY include/EASTL DESTINATION include)
|
||||
|
||||
44
eastl/all/patches/3.27.00-0001-use-conan.patch
Normal file
44
eastl/all/patches/3.27.00-0001-use-conan.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0124dc7..c048fb8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,16 +70,15 @@ target_include_directories(EASTL PUBLIC include)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------------------
|
||||
-FetchContent_Declare(
|
||||
- EABase
|
||||
- GIT_REPOSITORY https://github.com/electronicarts/EABase.git
|
||||
- GIT_TAG 0699a15efdfd20b6cecf02153bfa5663decb653c
|
||||
- GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase.
|
||||
-)
|
||||
-
|
||||
-FetchContent_MakeAvailable(EABase)
|
||||
-
|
||||
-target_link_libraries(EASTL EABase)
|
||||
+find_package(EABase REQUIRED CONFIG)
|
||||
+target_link_libraries(EASTL EABase::EABase)
|
||||
+
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
|
||||
+ if(MSVC OR CYGWIN)
|
||||
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
|
||||
+ endif()
|
||||
+endif()
|
||||
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Deprecations
|
||||
@@ -98,6 +97,13 @@ endif()
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Installation
|
||||
#-------------------------------------------------------------------------------------------
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS EASTL
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)
|
||||
+
|
||||
install(TARGETS EASTL DESTINATION lib)
|
||||
install(DIRECTORY include/EASTL DESTINATION include)
|
||||
|
||||
13
eastl/all/patches/3.27.00-0002-fix-assert-unused.patch
Normal file
13
eastl/all/patches/3.27.00-0002-fix-assert-unused.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/source/assert.cpp b/source/assert.cpp
|
||||
index d08878f..41426ae 100644
|
||||
--- a/source/assert.cpp
|
||||
+++ b/source/assert.cpp
|
||||
@@ -52,7 +52,7 @@ namespace eastl
|
||||
/// this function is not called in a thread-unsafe way. The easiest way to do this is
|
||||
/// to just call this function once from the main thread on application startup.
|
||||
///
|
||||
- EASTL_API void SetAssertionFailureFunction(EASTL_AssertionFailureFunction pAssertionFailureFunction, void* pContext)
|
||||
+ EASTL_API void SetAssertionFailureFunction(EASTL_AssertionFailureFunction pAssertionFailureFunction, [[maybe_unused]] void* pContext)
|
||||
{
|
||||
static EASTL_AssertionFailureFunction assertionFailureFunction_;
|
||||
assertionFailureFunction_ = pAssertionFailureFunction;
|
||||
44
eastl/all/patches/3.27.01-0001-use-conan.patch
Normal file
44
eastl/all/patches/3.27.01-0001-use-conan.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0124dc7..c048fb8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -70,16 +70,15 @@ target_include_directories(EASTL PUBLIC include)
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------------------
|
||||
-FetchContent_Declare(
|
||||
- EABase
|
||||
- GIT_REPOSITORY https://github.com/electronicarts/EABase.git
|
||||
- GIT_TAG 0699a15efdfd20b6cecf02153bfa5663decb653c
|
||||
- GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase.
|
||||
-)
|
||||
-
|
||||
-FetchContent_MakeAvailable(EABase)
|
||||
-
|
||||
-target_link_libraries(EASTL EABase)
|
||||
+find_package(EABase REQUIRED CONFIG)
|
||||
+target_link_libraries(EASTL EABase::EABase)
|
||||
+
|
||||
+if(BUILD_SHARED_LIBS)
|
||||
+ target_compile_definitions(EASTL PUBLIC EASTL_DLL)
|
||||
+ if(MSVC OR CYGWIN)
|
||||
+ target_compile_definitions(EASTL PRIVATE "EASTL_API=__declspec(dllexport)")
|
||||
+ endif()
|
||||
+endif()
|
||||
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Deprecations
|
||||
@@ -98,6 +97,13 @@ endif()
|
||||
#-------------------------------------------------------------------------------------------
|
||||
# Installation
|
||||
#-------------------------------------------------------------------------------------------
|
||||
+include(GNUInstallDirs)
|
||||
+install(TARGETS EASTL
|
||||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(DIRECTORY ${CMAKE_INSTALL_INCLUDEDIR}/EASTL DESTINATION include)
|
||||
+
|
||||
install(TARGETS EASTL DESTINATION lib)
|
||||
install(DIRECTORY include/EASTL DESTINATION include)
|
||||
|
||||
13
eastl/all/patches/3.27.01-0002-fix-assert-unused.patch
Normal file
13
eastl/all/patches/3.27.01-0002-fix-assert-unused.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/source/assert.cpp b/source/assert.cpp
|
||||
index d08878f..41426ae 100644
|
||||
--- a/source/assert.cpp
|
||||
+++ b/source/assert.cpp
|
||||
@@ -52,7 +52,7 @@ namespace eastl
|
||||
/// this function is not called in a thread-unsafe way. The easiest way to do this is
|
||||
/// to just call this function once from the main thread on application startup.
|
||||
///
|
||||
- EASTL_API void SetAssertionFailureFunction(EASTL_AssertionFailureFunction pAssertionFailureFunction, void* pContext)
|
||||
+ EASTL_API void SetAssertionFailureFunction(EASTL_AssertionFailureFunction pAssertionFailureFunction, [[maybe_unused]] void* pContext)
|
||||
{
|
||||
static EASTL_AssertionFailureFunction assertionFailureFunction_;
|
||||
assertionFailureFunction_ = pAssertionFailureFunction;
|
||||
8
eastl/all/test_package/CMakeLists.txt
Normal file
8
eastl/all/test_package/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
cmake_minimum_required(VERSION 3.15)
|
||||
project(test_package CXX)
|
||||
|
||||
find_package(EASTL REQUIRED CONFIG)
|
||||
|
||||
add_executable(${PROJECT_NAME} test_package.cpp)
|
||||
target_link_libraries(${PROJECT_NAME} EASTL::EASTL)
|
||||
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
|
||||
26
eastl/all/test_package/conanfile.py
Normal file
26
eastl/all/test_package/conanfile.py
Normal file
@@ -0,0 +1,26 @@
|
||||
from conan import ConanFile
|
||||
from conan.tools.build import can_run
|
||||
from conan.tools.cmake import cmake_layout, CMake
|
||||
import os
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def requirements(self):
|
||||
self.requires(self.tested_reference_str)
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
|
||||
def build(self):
|
||||
cmake = CMake(self)
|
||||
cmake.configure()
|
||||
cmake.build()
|
||||
|
||||
def test(self):
|
||||
if can_run(self):
|
||||
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
|
||||
self.run(bin_path, env="conanrun")
|
||||
16
eastl/all/test_package/test_package.cpp
Normal file
16
eastl/all/test_package/test_package.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <EASTL/hash_map.h>
|
||||
#include <new>
|
||||
|
||||
// https://github.com/electronicarts/EASTL/blob/master/doc/FAQ.md#info15-how-hard-is-it-to-incorporate-eastl-into-my-project
|
||||
void *operator new[](size_t size, [[maybe_unused]] const char *pName, [[maybe_unused]] int flags, [[maybe_unused]] unsigned debugFlags, [[maybe_unused]] const char *file, [[maybe_unused]] int line) {
|
||||
return new uint8_t[size];
|
||||
}
|
||||
void *operator new[](size_t size, [[maybe_unused]] size_t alignment, [[maybe_unused]] size_t alignmentOffset, [[maybe_unused]] const char *pName, [[maybe_unused]] int flags, [[maybe_unused]] unsigned debugFlags, [[maybe_unused]] const char *file, [[maybe_unused]] int line) {
|
||||
return new uint8_t[size];
|
||||
}
|
||||
|
||||
int main() {
|
||||
eastl::hash_map<int, int> map;
|
||||
map[0] = 1;
|
||||
return 0;
|
||||
}
|
||||
23
eastl/config.yml
Normal file
23
eastl/config.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
versions:
|
||||
"3.27.01":
|
||||
folder: "all"
|
||||
"3.27.00":
|
||||
folder: "all"
|
||||
"3.21.23":
|
||||
folder: "all"
|
||||
"3.21.12":
|
||||
folder: "all"
|
||||
"3.18.00":
|
||||
folder: "all"
|
||||
"3.17.06":
|
||||
folder: "all"
|
||||
"3.17.03":
|
||||
folder: "all"
|
||||
"3.16.07":
|
||||
folder: "all"
|
||||
"3.16.05":
|
||||
folder: "all"
|
||||
"3.16.01":
|
||||
folder: "all"
|
||||
"3.15.00":
|
||||
folder: "all"
|
||||
Reference in New Issue
Block a user