COMP: Consistent FetchContent usage

This commit is contained in:
David Allemang
2023-02-04 13:41:14 -05:00
parent 6c3754a3fa
commit 6ade8c8215
9 changed files with 31 additions and 1 deletions

View File

@@ -3,7 +3,6 @@ project(toddcox-faster)
set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD 20)
include(FetchContent)
include(vendor/eigen.cmake) include(vendor/eigen.cmake)
include(vendor/fmt.cmake) include(vendor/fmt.cmake)
include(vendor/glad.cmake) include(vendor/glad.cmake)

4
vendor/eigen.cmake vendored
View File

@@ -1,10 +1,14 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
eigen eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.4 GIT_TAG 3.4
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(EIGEN_BUILD_DOC OFF CACHE INTERNAL "") set(EIGEN_BUILD_DOC OFF CACHE INTERNAL "")
set(BUILD_TESTING OFF CACHE INTERNAL "") set(BUILD_TESTING OFF CACHE INTERNAL "")
set(EIGEN_BUILD_PKGCONFIG OFF CACHE INTERNAL "") set(EIGEN_BUILD_PKGCONFIG OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(eigen) FetchContent_MakeAvailable(eigen)

3
vendor/fmt.cmake vendored
View File

@@ -1,7 +1,10 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
fmt fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 9.1.0 GIT_TAG 9.1.0
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
FetchContent_MakeAvailable(fmt) FetchContent_MakeAvailable(fmt)

4
vendor/glad.cmake vendored
View File

@@ -1,10 +1,14 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
glad glad
GIT_REPOSITORY https://github.com/Dav1dde/glad.git GIT_REPOSITORY https://github.com/Dav1dde/glad.git
GIT_TAG v0.1.36 GIT_TAG v0.1.36
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(GLAD_PROFILE "core" CACHE INTERNAL "OpenGL profile") set(GLAD_PROFILE "core" CACHE INTERNAL "OpenGL profile")
set(GLAD_API "gl=4.6" CACHE INTERNAL "API type/version pairs, like \"gl=3.2,gles=\", no version means latest") set(GLAD_API "gl=4.6" CACHE INTERNAL "API type/version pairs, like \"gl=3.2,gles=\", no version means latest")
set(GLAD_GENERATOR "c" CACHE INTERNAL "Language to generate the binding for") set(GLAD_GENERATOR "c" CACHE INTERNAL "Language to generate the binding for")
FetchContent_MakeAvailable(glad) FetchContent_MakeAvailable(glad)

4
vendor/glfw.cmake vendored
View File

@@ -1,11 +1,15 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
glfw glfw
GIT_REPOSITORY https://github.com/glfw/glfw.git GIT_REPOSITORY https://github.com/glfw/glfw.git
GIT_TAG 3.3.6 GIT_TAG 3.3.6
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "") set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "")
set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "") set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "")
set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "") set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "")
set(GLFW_INSTALL OFF CACHE INTERNAL "") set(GLFW_INSTALL OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(glfw) FetchContent_MakeAvailable(glfw)

4
vendor/gtest.cmake vendored
View File

@@ -1,8 +1,12 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
gtest gtest
GIT_REPOSITORY https://github.com/google/googletest.git GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG release-1.12.1 GIT_TAG release-1.12.1
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(gtest) FetchContent_MakeAvailable(gtest)

4
vendor/peglib.cmake vendored
View File

@@ -1,10 +1,14 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
peglib peglib
GIT_REPOSITORY https://github.com/yhirose/cpp-peglib GIT_REPOSITORY https://github.com/yhirose/cpp-peglib
GIT_TAG v1.8.2 GIT_TAG v1.8.2
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(PEGLIB_BUILD_TESTS OFF CACHE INTERNAL "") set(PEGLIB_BUILD_TESTS OFF CACHE INTERNAL "")
FetchContent_GetProperties(peglib) FetchContent_GetProperties(peglib)
if(NOT ${peglib}_POPULATED) if(NOT ${peglib}_POPULATED)
FetchContent_Populate(peglib) FetchContent_Populate(peglib)

View File

@@ -1,8 +1,12 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
toddcox toddcox
GIT_REPOSITORY https://github.com/jcraymond/toddcox-faster.git GIT_REPOSITORY https://github.com/jcraymond/toddcox-faster.git
GIT_TAG 265de59917bdf94709b40ad8aef5dd9ce5574242 GIT_TAG 265de59917bdf94709b40ad8aef5dd9ce5574242
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(TC_BUILD_EXAMPLE OFF CACHE INTERNAL "") set(TC_BUILD_EXAMPLE OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(toddcox) FetchContent_MakeAvailable(toddcox)

View File

@@ -1,11 +1,15 @@
include(FetchContent)
FetchContent_Declare( FetchContent_Declare(
yaml-cpp yaml-cpp
GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git GIT_REPOSITORY https://github.com/jbeder/yaml-cpp.git
GIT_TAG yaml-cpp-0.7.0 GIT_TAG yaml-cpp-0.7.0
GIT_PROGRESS TRUE GIT_PROGRESS TRUE
) )
set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "") set(GLFW_BUILD_EXAMPLES OFF CACHE INTERNAL "")
set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "") set(GLFW_BUILD_TESTS OFF CACHE INTERNAL "")
set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "") set(GLFW_BUILD_DOCS OFF CACHE INTERNAL "")
set(GLFW_INSTALL OFF CACHE INTERNAL "") set(GLFW_INSTALL OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(yaml-cpp) FetchContent_MakeAvailable(yaml-cpp)