Removed submodules, replaced with cmake fetch

This means that only if you ask for tests explicitely will
glfw and Catch2 be gotten, eliminating accidental submodule
recurses.
This commit is contained in:
Charles Giessen 2020-06-08 17:30:29 -06:00
parent bbe3971a04
commit 5e2b9e6827
5 changed files with 27 additions and 26 deletions

6
.gitmodules vendored
View File

@ -1,6 +0,0 @@
[submodule "ext/glfw"]
path = ext/glfw
url = https://github.com/glfw/glfw
[submodule "ext/Catch2"]
path = ext/Catch2
url = https://github.com/catchorg/Catch2

View File

@ -39,6 +39,7 @@ target_link_libraries(vk-bootstrap
option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF)
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME OR VK_BOOTSTRAP_TEST)
add_subdirectory(ext)
add_subdirectory(tests)
add_subdirectory(example)

View File

@ -1,20 +1,28 @@
set(GLFW_BUILD_TESTS
OFF
CACHE BOOL "" FORCE)
set(GLFW_BUILD_DOCS
OFF
CACHE BOOL "" FORCE)
set(GLFW_INSTALL
OFF
CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES
OFF
CACHE BOOL "" FORCE)
add_subdirectory(glfw)
set(CATCH_BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(CATCH_ENABLE_WERROR OFF CACHE BOOL "" FORCE)
set(CATCH_INSTALL_DOCS OFF CACHE BOOL "" FORCE)
set(CATCH_INSTALL_HELPERS OFF CACHE BOOL "" FORCE)
option(GLFW_BUILD_TESTS "" OFF)
option(GLFW_BUILD_DOCS "" OFF)
option(GLFW_INSTALL "" OFF)
option(GLFW_BUILD_EXAMPLES "" OFF)
#add_subdirectory(glfw)
option(CATCH_BUILD_TESTING "" OFF)
option(CATCH_ENABLE_WERROR "" OFF)
option(CATCH_INSTALL_DOCS "" OFF)
option(CATCH_INSTALL_HELPERS "" OFF)
set_property(GLOBAL PROPERTY CTEST_TARGETS_ADDED 1) #remove Catch2 target spam
add_subdirectory(Catch2)
#add_subdirectory(Catch2)
include(FetchContent)
FetchContent_Declare(
glfw
GIT_REPOSITORY https://github.com/glfw/glfw
GIT_TAG 3.3.2
)
FetchContent_MakeAvailable(glfw)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2
GIT_TAG v2.12.2
)
FetchContent_MakeAvailable(Catch2)

@ -1 +0,0 @@
Subproject commit 2d172dc688ffab0867a94928159e93384475a870

@ -1 +0,0 @@
Subproject commit 0ac013381be83fcd6e53ea874f09b1895943bd9e