Initial commit

This commit is contained in:
2026-01-23 22:15:36 +01:00
commit ca60108606
167 changed files with 5311 additions and 0 deletions

View File

@@ -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)

View File

@@ -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)

View 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

View File

@@ -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

View 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>;
}

View 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)

View 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)

View 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;

View 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)

View 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;