Skip to content

Commit 34fdf6d

Browse files
committed
added functions.cmake module
1 parent 4cb8b52 commit 34fdf6d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

cmake/functions.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
include(FetchContent)
2+
3+
function(fetch_project)
4+
cmake_parse_arguments(FETCH_SOURCE "" "NAME;URL" "" ${ARGN})
5+
FetchContent_Declare(${FETCH_SOURCE_NAME}
6+
URL ${FETCH_SOURCE_URL}
7+
)
8+
9+
FetchContent_MakeAvailable(${FETCH_SOURCE_NAME})
10+
endfunction()

0 commit comments

Comments
 (0)