Skip to content

Commit 2eccc8f

Browse files
committed
Updates HunterGate
1 parent 75a2488 commit 2eccc8f

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

tests/cmake/HunterGate.cmake

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2013-2018, Ruslan Baratov
1+
# Copyright (c) 2013-2019, Ruslan Baratov
22
# All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without
@@ -60,7 +60,7 @@ option(HUNTER_STATUS_PRINT "Print working status" ON)
6060
option(HUNTER_STATUS_DEBUG "Print a lot info" OFF)
6161
option(HUNTER_TLS_VERIFY "Enable/disable TLS certificate checking on downloads" ON)
6262

63-
set(HUNTER_WIKI "https://github.com/ruslo/hunter/wiki")
63+
set(HUNTER_ERROR_PAGE "https://docs.hunter.sh/en/latest/reference/errors")
6464

6565
function(hunter_gate_status_print)
6666
if(HUNTER_STATUS_PRINT OR HUNTER_STATUS_DEBUG)
@@ -79,9 +79,9 @@ function(hunter_gate_status_debug)
7979
endif()
8080
endfunction()
8181

82-
function(hunter_gate_wiki wiki_page)
83-
message("------------------------------ WIKI -------------------------------")
84-
message(" ${HUNTER_WIKI}/${wiki_page}")
82+
function(hunter_gate_error_page error_page)
83+
message("------------------------------ ERROR ------------------------------")
84+
message(" ${HUNTER_ERROR_PAGE}/${error_page}.html")
8585
message("-------------------------------------------------------------------")
8686
message("")
8787
message(FATAL_ERROR "")
@@ -94,26 +94,25 @@ function(hunter_gate_internal_error)
9494
endforeach()
9595
message("[hunter ** INTERNAL **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
9696
message("")
97-
hunter_gate_wiki("error.internal")
97+
hunter_gate_error_page("error.internal")
9898
endfunction()
9999

100100
function(hunter_gate_fatal_error)
101-
cmake_parse_arguments(hunter "" "WIKI" "" "${ARGV}")
102-
string(COMPARE EQUAL "${hunter_WIKI}" "" have_no_wiki)
103-
if(have_no_wiki)
104-
hunter_gate_internal_error("Expected wiki")
101+
cmake_parse_arguments(hunter "" "ERROR_PAGE" "" "${ARGV}")
102+
if("${hunter_ERROR_PAGE}" STREQUAL "")
103+
hunter_gate_internal_error("Expected ERROR_PAGE")
105104
endif()
106105
message("")
107106
foreach(x ${hunter_UNPARSED_ARGUMENTS})
108107
message("[hunter ** FATAL ERROR **] ${x}")
109108
endforeach()
110109
message("[hunter ** FATAL ERROR **] [Directory:${CMAKE_CURRENT_LIST_DIR}]")
111110
message("")
112-
hunter_gate_wiki("${hunter_WIKI}")
111+
hunter_gate_error_page("${hunter_ERROR_PAGE}")
113112
endfunction()
114113

115114
function(hunter_gate_user_error)
116-
hunter_gate_fatal_error(${ARGV} WIKI "error.incorrect.input.data")
115+
hunter_gate_fatal_error(${ARGV} ERROR_PAGE "error.incorrect.input.data")
117116
endfunction()
118117

119118
function(hunter_gate_self root version sha1 result)
@@ -195,7 +194,7 @@ function(hunter_gate_detect_root)
195194

196195
hunter_gate_fatal_error(
197196
"Can't detect HUNTER_ROOT"
198-
WIKI "error.detect.hunter.root"
197+
ERROR_PAGE "error.detect.hunter.root"
199198
)
200199
endfunction()
201200

@@ -214,7 +213,7 @@ function(hunter_gate_download dir)
214213
"Settings:"
215214
" HUNTER_ROOT: ${HUNTER_GATE_ROOT}"
216215
" HUNTER_SHA1: ${HUNTER_GATE_SHA1}"
217-
WIKI "error.run.install"
216+
ERROR_PAGE "error.run.install"
218217
)
219218
endif()
220219
string(COMPARE EQUAL "${dir}" "" is_bad)
@@ -400,7 +399,7 @@ macro(HunterGate)
400399
hunter_gate_fatal_error(
401400
"Please set HunterGate *before* 'project' command. "
402401
"Detected project: ${PROJECT_NAME}"
403-
WIKI "error.huntergate.before.project"
402+
ERROR_PAGE "error.huntergate.before.project"
404403
)
405404
endif()
406405

@@ -470,7 +469,7 @@ macro(HunterGate)
470469
"HUNTER_ROOT (${HUNTER_GATE_ROOT}) contains spaces."
471470
"Set HUNTER_ALLOW_SPACES_IN_PATH=ON to skip this error"
472471
"(Use at your own risk!)"
473-
WIKI "error.spaces.in.hunter.root"
472+
ERROR_PAGE "error.spaces.in.hunter.root"
474473
)
475474
endif()
476475
endif()

0 commit comments

Comments
 (0)