Skip to content

Commit bf8c2ee

Browse files
committed
parameter template
1 parent 3ee61cb commit bf8c2ee

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

install_ninja.cmake

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ endif()
9292
if(NOT EXISTS ${archive})
9393
set(url ${host}${name})
9494
message(STATUS "download ${url}")
95-
file(DOWNLOAD ${url} ${archive})
95+
file(DOWNLOAD ${url} ${archive} INACTIVITY_TIMEOUT 15)
9696
file(SIZE ${archive} fsize)
9797
if(fsize LESS 10000)
9898
message(FATAL_ERROR "failed to download ${url}")
@@ -102,9 +102,11 @@ endif()
102102
message(STATUS "extracting to ${path}")
103103
file(ARCHIVE_EXTRACT INPUT ${archive} DESTINATION ${path})
104104

105-
find_program(ninja NAMES ninja PATHS ${path} PATH_SUFFIXES bin NO_DEFAULT_PATH)
106-
if(NOT ninja)
107-
message(FATAL_ERROR "failed to install Ninja from ${archive}")
108-
endif()
105+
find_program(ninja
106+
NAMES ninja
107+
PATHS ${path}
108+
PATH_SUFFIXES bin
109+
NO_DEFAULT_PATH
110+
REQUIRED)
109111

110112
checkup(${ninja})

0 commit comments

Comments
 (0)