Skip to content

Commit

Permalink
[eclipse-iceoryx#264] Use FetchContent_MakeAvailable
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Jul 5, 2024
1 parent dcbc800 commit 10f0ada
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions iceoryx2-ffi/c/tests/cmake/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
include(FetchContent)

FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
EXCLUDE_FROM_ALL
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
EXCLUDE_FROM_ALL
)

FetchContent_GetProperties(googletest)
if(NOT googletest_POPULATED)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
message(STATUS "googletest not found! Using FetchContent!")
endif()
FetchContent_MakeAvailable(googletest)
4 changes: 2 additions & 2 deletions iceoryx2-ffi/cxx/cmake/fetch-iceoryx-hoofs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ if(NOT iceoryx_platform_FOUND OR NOT iceoryx_hoofs_FOUND)
)
FetchContent_GetProperties(iceoryx)
if (NOT iceoryx_POPULATED)
message(STATUS "updating: iceoryx" )
FetchContent_Populate(iceoryx)
message(STATUS "iceoryx_hoofs not found! Using FetchContent!")
endif()
FetchContent_MakeAvailable(iceoryx)

set(ICEORYX_WITH_FETCH_CONTENT true CACHE INTERNAL "")
set(iceoryx_SOURCE_DIR ${iceoryx_SOURCE_DIR} CACHE INTERNAL "")
Expand Down
12 changes: 6 additions & 6 deletions iceoryx2-ffi/cxx/tests/cmake/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
include(FetchContent)

FetchContent_Declare(
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
EXCLUDE_FROM_ALL
googletest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.14.0
EXCLUDE_FROM_ALL
)

FetchContent_GetProperties(googletest)
if(NOT googletest_POPULATED)
FetchContent_Populate(googletest)
add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR} EXCLUDE_FROM_ALL)
message(STATUS "googletest not found! Using FetchContent!")
endif()
FetchContent_MakeAvailable(googletest)

0 comments on commit 10f0ada

Please sign in to comment.