Skip to content

Commit

Permalink
Change some error from fatal to user error
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjoe committed Jun 28, 2018
1 parent 7c804a9 commit 97a5b8f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion cmake/modules/hunter_autotools_configure_command.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ include(CMakeParseArguments)

include(hunter_dump_cmake_flags)
include(hunter_fatal_error)
include(hunter_user_error)
include(hunter_get_build_flags)
include(hunter_get_toolchain_binaries)
include(hunter_internal_error)
Expand Down Expand Up @@ -76,7 +77,7 @@ function(hunter_autotools_configure_command out_command_line)
if(has_configure_host)
set(configure_host --host=${PARAM_CONFIGURE_HOST})
else()
hunter_fatal_error("hunter_autotools_configure_command on iOS build must supply a CONFIGURE_HOST")
hunter_user_error("hunter_autotools_configure_command on iOS build must supply a CONFIGURE_HOST")
endif()
elseif(is_cross_compile)
set(configure_host --host=${CROSS_COMPILE_TOOLCHAIN_PREFIX})
Expand All @@ -88,6 +89,7 @@ function(hunter_autotools_configure_command out_command_line)
set(configure_command)

list(APPEND configure_command "./configure")

string(COMPARE NOTEQUAL "${configure_host}" "" has_configure_host)
if(has_configure_host)
list(APPEND configure_command ${configure_host})
Expand Down
6 changes: 3 additions & 3 deletions cmake/modules/hunter_autotools_project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ include(ExternalProject) # ExternalProject_Add
include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_autotools_configure_command)
include(hunter_fatal_error)
include(hunter_user_error)
include(hunter_status_debug)
include(hunter_assert_not_empty_string)

Expand Down Expand Up @@ -142,7 +142,7 @@ function(hunter_autotools_project target_name)
if(is_ios)
hunter_status_debug("Autotools iOS IPHONEOS_ARCHS: ${IPHONEOS_ARCHS} IPHONESIMULATOR_ARCHS: ${IPHONESIMULATOR_ARCHS}")
if(BUILD_SHARED_LIBS)
hunter_fatal_error("Autotools: building iOS libraries as shared is not supported")
hunter_user_error("Autotools: building iOS libraries as shared is not supported")
endif()
set(ios_architectures)
list(APPEND ios_architectures ${IPHONEOS_ARCHS} ${IPHONESIMULATOR_ARCHS})
Expand Down Expand Up @@ -238,7 +238,7 @@ function(hunter_autotools_project target_name)
set(configure_host "x86_64-apple-darwin")
set(is_simulator TRUE)
else()
hunter_fatal_error("iOS architecture: ${ios_architecture} not supported")
hunter_user_error("iOS architecture: ${ios_architecture} not supported")
endif()

set(arch_flags)
Expand Down
3 changes: 2 additions & 1 deletion cmake/schemes/url_sha1_download.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ project(Hunter)
list(APPEND CMAKE_MODULE_PATH "@HUNTER_SELF@/cmake/modules")

include(hunter_fatal_error)
include(hunter_user_error)
include(hunter_status_debug)
include(hunter_status_print)
include(hunter_assert_not_empty_string)
Expand Down Expand Up @@ -36,7 +37,7 @@ set(counter "")
while(TRUE)
string(COMPARE EQUAL "${counter}" "xxx" stop)
if(stop)
hunter_fatal_error("Download failed")
hunter_user_error("Download failed")
endif()

if(EXISTS "${dest}")
Expand Down

0 comments on commit 97a5b8f

Please sign in to comment.