diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 0be723e9..95cc6a45 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -8,13 +8,12 @@ on: jobs: checkout: - name: Checkout EASTL and submodules + name: Checkout EASTL runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: path: EASTL/ - - run: cd EASTL/ && git submodule update --init - name: Upload checked out code uses: actions/upload-artifact@v2.3.1 with: diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 0b6afcc8..00000000 --- a/.gitmodules +++ /dev/null @@ -1,18 +0,0 @@ -[submodule "test/packages/EABase"] - path = test/packages/EABase - url = ../EABase.git -[submodule "test/packages/EAAssert"] - path = test/packages/EAAssert - url = ../EAAssert.git -[submodule "test/packages/EAMain"] - path = test/packages/EAMain - url = ../EAMain.git -[submodule "test/packages/EAStdC"] - path = test/packages/EAStdC - url = ../EAStdC.git -[submodule "test/packages/EATest"] - path = test/packages/EATest - url = ../EATest.git -[submodule "test/packages/EAThread"] - path = test/packages/EAThread - url = ../EAThread.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 20029af5..a57fa595 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,8 @@ #------------------------------------------------------------------------------------------- # Copyright (C) Electronic Arts Inc. All rights reserved. #------------------------------------------------------------------------------------------- -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.11) +include(FetchContent) project(EASTL CXX) #------------------------------------------------------------------------------------------- @@ -64,9 +65,14 @@ target_include_directories(EASTL PUBLIC include) #------------------------------------------------------------------------------------------- # Dependencies #------------------------------------------------------------------------------------------- -if (NOT TARGET EABase) - add_subdirectory(test/packages/EABase) -endif() +FetchContent_Declare( + EABase + GIT_REPOSITORY https://github.com/electronicarts/EABase.git + GIT_TAG 521cb053d9320636f53226ffc616216cf532f0ef + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase. +) + +FetchContent_MakeAvailable(EABase) target_link_libraries(EASTL EABase) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 036520e4..7a4422a4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,18 +27,13 @@ Your pull request should: ### Getting the Repository -EASTL uses git submodules for its dependencies as they are seperate git repositories. Recursive clones will continue until HD space is exhausted unless they are manually limited. -It is recommended to use the following to get the source: - ```bash git clone https://github.com/electronicarts/EASTL -cd EASTL -git submodule update --init ``` ### Running the Unit Tests -EASTL uses CMake as its build system. +EASTL uses CMake as its build system. * Create and navigate to "your_build_folder": * mkdir your_build_folder && cd your_build_folder diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0dcee127..8972a172 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -5,7 +5,7 @@ #------------------------------------------------------------------------------------------- # CMake info #------------------------------------------------------------------------------------------- -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.11) project(EASTLTest CXX) include(CTest) @@ -74,21 +74,62 @@ target_include_directories(EASTLTest PUBLIC include) #------------------------------------------------------------------------------------------- # Dependencies #------------------------------------------------------------------------------------------- -add_subdirectory(packages/EABase) -add_subdirectory(packages/EAAssert) -add_subdirectory(packages/EAStdC) -add_subdirectory(packages/EAMain) -add_subdirectory(packages/EATest) -add_subdirectory(packages/EAThread) - +FetchContent_Declare( + EABase + GIT_REPOSITORY https://github.com/electronicarts/EABase.git + GIT_TAG 521cb053d9320636f53226ffc616216cf532f0ef + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EABase. +) +FetchContent_MakeAvailable(EABase) target_link_libraries(EASTLTest EABase) + +FetchContent_Declare( + EAAssert + GIT_REPOSITORY https://github.com/electronicarts/EAAssert.git + GIT_TAG e5e181255de2e883dd1f987c78ccc42ac81d3bca + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EAAssert. +) +FetchContent_MakeAvailable(EAAssert) target_link_libraries(EASTLTest EAAssert) -target_link_libraries(EASTLTest EAMain) -target_link_libraries(EASTLTest EASTL) + +FetchContent_Declare( + EAStdC + GIT_REPOSITORY https://github.com/electronicarts/EAStdC.git + GIT_TAG fbcc34e89c63636054334888f3a5bd7ac2fd4b76 + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EAStdC. +) +FetchContent_MakeAvailable(EAStdC) target_link_libraries(EASTLTest EAStdC) + +FetchContent_Declare( + EAMain + GIT_REPOSITORY https://github.com/electronicarts/EAMain.git + GIT_TAG 24ca8bf09e6b47b860286fc2f4c832f4009273d1 + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EAMain. +) +FetchContent_MakeAvailable(EAMain) +target_link_libraries(EASTLTest EAMain) + +FetchContent_Declare( + EATest + GIT_REPOSITORY https://github.com/electronicarts/EATest.git + GIT_TAG a59b372fc9cba517283ad6d060d2ab96e0ba34ac + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EATest. +) +FetchContent_MakeAvailable(EATest) target_link_libraries(EASTLTest EATest) + +FetchContent_Declare( + EAThread + GIT_REPOSITORY https://github.com/electronicarts/EAThread.git + GIT_TAG f3c6c54d19699639a5edcf5237ea8b71aca6842c + GIT_SUBMODULES "" # This should be temporary until we update the cyclic submodule dependencies in EAThread. +) +FetchContent_MakeAvailable(EAThread) target_link_libraries(EASTLTest EAThread) +target_link_libraries(EASTLTest EASTL) + set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED) diff --git a/test/packages/EAAssert b/test/packages/EAAssert deleted file mode 160000 index e5e18125..00000000 --- a/test/packages/EAAssert +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e5e181255de2e883dd1f987c78ccc42ac81d3bca diff --git a/test/packages/EABase b/test/packages/EABase deleted file mode 160000 index 521cb053..00000000 --- a/test/packages/EABase +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 521cb053d9320636f53226ffc616216cf532f0ef diff --git a/test/packages/EAMain b/test/packages/EAMain deleted file mode 160000 index 24ca8bf0..00000000 --- a/test/packages/EAMain +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 24ca8bf09e6b47b860286fc2f4c832f4009273d1 diff --git a/test/packages/EAStdC b/test/packages/EAStdC deleted file mode 160000 index 8dc9e314..00000000 --- a/test/packages/EAStdC +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8dc9e314fdbe09d0627c613ae2eb6543859e995d diff --git a/test/packages/EATest b/test/packages/EATest deleted file mode 160000 index a59b372f..00000000 --- a/test/packages/EATest +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a59b372fc9cba517283ad6d060d2ab96e0ba34ac diff --git a/test/packages/EAThread b/test/packages/EAThread deleted file mode 160000 index e4367a36..00000000 --- a/test/packages/EAThread +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e4367a36f2e55d10b2b994bfbae8edf21f15bafd