Skip to content

Commit

Permalink
Remove submodules, use CMake's FetchContent instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
grojo-ea committed Jul 26, 2024
1 parent 05f4b4a commit 3f9fa48
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 39 deletions.
18 changes: 0 additions & 18 deletions .gitmodules

This file was deleted.

14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)

#-------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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)

Expand Down
61 changes: 50 additions & 11 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#-------------------------------------------------------------------------------------------
# CMake info
#-------------------------------------------------------------------------------------------
cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.11)
project(EASTLTest CXX)
include(CTest)

Expand Down Expand Up @@ -74,19 +74,58 @@ 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)

target_link_libraries(EASTLTest EABase)
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)

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)

set(THREADS_PREFER_PTHREAD_FLAG ON)
Expand Down
1 change: 0 additions & 1 deletion test/packages/EAAssert
Submodule EAAssert deleted from e5e181
1 change: 0 additions & 1 deletion test/packages/EABase
Submodule EABase deleted from 521cb0
1 change: 0 additions & 1 deletion test/packages/EAMain
Submodule EAMain deleted from 24ca8b
1 change: 0 additions & 1 deletion test/packages/EAStdC
Submodule EAStdC deleted from 8dc9e3
1 change: 0 additions & 1 deletion test/packages/EATest
Submodule EATest deleted from a59b37
1 change: 0 additions & 1 deletion test/packages/EAThread
Submodule EAThread deleted from e4367a

0 comments on commit 3f9fa48

Please sign in to comment.