Skip to content

Commit

Permalink
hunter_test_string_not_empty -> hunter_assert_not_empty_string
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslo committed May 28, 2018
1 parent 1436a87 commit 60733ea
Show file tree
Hide file tree
Showing 94 changed files with 611 additions and 611 deletions.
2 changes: 1 addition & 1 deletion cmake/modules/hunter_add_package.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(hunter_finalize)
include(hunter_get_project_files_to_load)
include(hunter_internal_error)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

# internal variables: _hunter_ap_*
macro(hunter_add_package)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/hunter_append_component.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

# check if component is in specified version range, add to 'varname' if valid
# - varname: name of the variable of the list to append component names
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/hunter_apply_copy_rules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

include(hunter_internal_error)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_apply_copy_rules)
hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}")
hunter_assert_not_empty_string("${HUNTER_INSTALL_PREFIX}")

get_property(copy_list GLOBAL PROPERTY HUNTER_COPY_FILES)

Expand Down
18 changes: 9 additions & 9 deletions cmake/modules/hunter_apply_gate_settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include(hunter_check_flush_needed)
include(hunter_internal_error)
include(hunter_set_config_location)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_apply_gate_settings)
get_property(gate_done GLOBAL PROPERTY HUNTER_GATE_SETTINGS_APPLIED SET)
Expand Down Expand Up @@ -143,11 +143,11 @@ function(hunter_apply_gate_settings)


# test if mandatory variables are set
hunter_test_string_not_empty("${HUNTER_GATE_ROOT}")
hunter_test_string_not_empty("${HUNTER_GATE_SHA1}")
hunter_test_string_not_empty("${HUNTER_GATE_CONFIG_SHA1}")
hunter_test_string_not_empty("${HUNTER_GATE_VERSION}")
hunter_test_string_not_empty("${HUNTER_GATE_TOOLCHAIN_SHA1}")
hunter_assert_not_empty_string("${HUNTER_GATE_ROOT}")
hunter_assert_not_empty_string("${HUNTER_GATE_SHA1}")
hunter_assert_not_empty_string("${HUNTER_GATE_CONFIG_SHA1}")
hunter_assert_not_empty_string("${HUNTER_GATE_VERSION}")
hunter_assert_not_empty_string("${HUNTER_GATE_TOOLCHAIN_SHA1}")

if(cache_init)
hunter_check_flush_needed("${hunter_self}" flush_done)
Expand All @@ -160,9 +160,9 @@ function(hunter_apply_gate_settings)
endif()

# See hunter_initialize
hunter_test_string_not_empty("${HUNTER_CACHED_ROOT}")
hunter_test_string_not_empty("${HUNTER_VERSION}")
hunter_test_string_not_empty("${HUNTER_SHA1}")
hunter_assert_not_empty_string("${HUNTER_CACHED_ROOT}")
hunter_assert_not_empty_string("${HUNTER_VERSION}")
hunter_assert_not_empty_string("${HUNTER_SHA1}")

# This variables will be saved in HUNTER_CACHE_FILE (hunter_create_cache_file)
set(HUNTER_CONFIG_SHA1 "${HUNTER_GATE_CONFIG_SHA1}" CACHE INTERNAL "")
Expand Down
10 changes: 5 additions & 5 deletions cmake/modules/hunter_autotools_project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ include(CMakeParseArguments) # cmake_parse_arguments
include(hunter_autotools_configure_command)
include(hunter_fatal_error)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

# Packages to test this function:
# * xau
Expand Down Expand Up @@ -103,10 +103,10 @@ function(hunter_autotools_project target_name)
)
endif()

hunter_test_string_not_empty("${PARAM_BUILD_DIR}")
hunter_test_string_not_empty("${PARAM_GLOBAL_INSTALL_DIR}")
hunter_test_string_not_empty("${PARAM_INSTALL_DIR}")
hunter_test_string_not_empty("${PARAM_PACKAGE_CONFIGURATION_TYPES}")
hunter_assert_not_empty_string("${PARAM_BUILD_DIR}")
hunter_assert_not_empty_string("${PARAM_GLOBAL_INSTALL_DIR}")
hunter_assert_not_empty_string("${PARAM_INSTALL_DIR}")
hunter_assert_not_empty_string("${PARAM_PACKAGE_CONFIGURATION_TYPES}")

set(default_path "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin")
set(shell_env_path "PATH=${PARAM_GLOBAL_INSTALL_DIR}/bin:${default_path}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/hunter_boost_component_b2_args.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include(hunter_add_package)
include("${CMAKE_CURRENT_LIST_DIR}/../Hunter")

function(hunter_boost_component_b2_args compName boostCmakeArgs outList)
hunter_test_string_not_empty("${BOOST_VERSION}")
hunter_assert_not_empty_string("${BOOST_VERSION}")

string(TOUPPER ${compName} upperCompName)
set(myList "")#empty
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/hunter_cache_run.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_add_package)
include(hunter_internal_error)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

# Do not install any packages.
# Check cache and load cache.sha1 to home directory on hit.
Expand All @@ -15,7 +15,7 @@ function(hunter_cache_run)
# -> x_PACKAGE
# -> x_COMPONENT

hunter_test_string_not_empty("${x_PACKAGE}")
hunter_assert_not_empty_string("${x_PACKAGE}")

string(COMPARE NOTEQUAL "${x_COMPONENT}" "" has_component)
string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed)
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/hunter_cacheable.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(hunter_assert_empty_string)

function(hunter_cacheable package)
hunter_assert_empty_string("${ARGN}")
hunter_test_string_not_empty("${package}")
hunter_assert_not_empty_string("${package}")

set("__HUNTER_CACHEABLE_${package}" TRUE PARENT_SCOPE)
endfunction()
12 changes: 6 additions & 6 deletions cmake/modules/hunter_calculate_config_sha1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ include(hunter_lock_directory)
include(hunter_make_directory)
include(hunter_print_cmd)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)
include(hunter_user_error)

function(hunter_calculate_config_sha1 hunter_self hunter_base user_config)
hunter_test_string_not_empty("${HUNTER_GATE_SHA1}")
hunter_test_string_not_empty("${hunter_self}")
hunter_test_string_not_empty("${hunter_base}")
hunter_test_string_not_empty("${user_config}")
hunter_test_string_not_empty("${CMAKE_BINARY_DIR}")
hunter_assert_not_empty_string("${HUNTER_GATE_SHA1}")
hunter_assert_not_empty_string("${hunter_self}")
hunter_assert_not_empty_string("${hunter_base}")
hunter_assert_not_empty_string("${user_config}")
hunter_assert_not_empty_string("${CMAKE_BINARY_DIR}")

hunter_status_print("Calculating Config-SHA1")

Expand Down
10 changes: 5 additions & 5 deletions cmake/modules/hunter_calculate_self.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
cmake_minimum_required(VERSION 3.0)

include(hunter_internal_error)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_calculate_self root version sha1 result)
hunter_test_string_not_empty("${root}")
hunter_test_string_not_empty("${version}")
hunter_test_string_not_empty("${sha1}")
hunter_test_string_not_empty("${result}")
hunter_assert_not_empty_string("${root}")
hunter_assert_not_empty_string("${version}")
hunter_assert_not_empty_string("${sha1}")
hunter_assert_not_empty_string("${result}")

string(SUBSTRING "${sha1}" 0 7 archive_id)

Expand Down
10 changes: 5 additions & 5 deletions cmake/modules/hunter_calculate_toolchain_sha1.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ include(hunter_make_directory)
include(hunter_print_cmd)
include(hunter_status_debug)
include(hunter_status_print)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_calculate_toolchain_sha1 hunter_self hunter_base)
hunter_test_string_not_empty("${hunter_self}")
hunter_test_string_not_empty("${hunter_base}")
hunter_test_string_not_empty("${CMAKE_BINARY_DIR}")
hunter_test_string_not_empty("${CMAKE_GENERATOR}")
hunter_assert_not_empty_string("${hunter_self}")
hunter_assert_not_empty_string("${hunter_base}")
hunter_assert_not_empty_string("${CMAKE_BINARY_DIR}")
hunter_assert_not_empty_string("${CMAKE_GENERATOR}")

if(CMAKE_TOOLCHAIN_FILE)
set(use_toolchain "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}")
Expand Down
8 changes: 4 additions & 4 deletions cmake/modules/hunter_check_download_error_message.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ function(hunter_check_download_error_message)
# x_NOT_FOUND_COUNTER
# x_UNPARSED_ARGUMENTS

hunter_test_string_not_empty("${x_ERROR_CODE}")
hunter_test_string_not_empty("${x_ERROR_MESSAGE}")
hunter_test_string_not_empty("${x_REMOVE_ON_ERROR}")
hunter_test_string_not_empty("${x_NOT_FOUND_COUNTER}")
hunter_assert_not_empty_string("${x_ERROR_CODE}")
hunter_assert_not_empty_string("${x_ERROR_MESSAGE}")
hunter_assert_not_empty_string("${x_REMOVE_ON_ERROR}")
hunter_assert_not_empty_string("${x_NOT_FOUND_COUNTER}")

string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed)
if(has_unparsed)
Expand Down
6 changes: 3 additions & 3 deletions cmake/modules/hunter_check_flush_needed.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
include(hunter_flush_cache_variables)
include(hunter_internal_error)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_check_flush_needed hunter_self flush_done)
hunter_test_string_not_empty("${flush_done}")
hunter_test_string_not_empty("${hunter_self}")
hunter_assert_not_empty_string("${flush_done}")
hunter_assert_not_empty_string("${hunter_self}")

# Variables must be checked in 'hunter_initialize'
string(COMPARE EQUAL "${HUNTER_CACHED_ROOT}" "${HUNTER_GATE_ROOT}" is_ok)
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/hunter_check_toolchain_definition.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_check_toolchain_definition)
set(function_name "hunter_check_toolchain_definition")
Expand Down Expand Up @@ -43,7 +43,7 @@ function(hunter_check_toolchain_definition)
set(definition "${hunter_ct_arg_NAME}")

# the toolchain path must be set
hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}")
hunter_assert_not_empty_string("${HUNTER_TOOLCHAIN_ID_PATH}")
set(TOOLCHAIN_INFO_FILE "${HUNTER_TOOLCHAIN_ID_PATH}/toolchain.info")

# read toolchain.info file into memory, each line a entry in a list
Expand Down
18 changes: 9 additions & 9 deletions cmake/modules/hunter_create_cache_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
# All rights reserved.

include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_create_cache_file cache_path)
hunter_test_string_not_empty("${cache_path}")

hunter_test_string_not_empty("${HUNTER_CACHED_ROOT}")
hunter_test_string_not_empty("${HUNTER_SHA1}")
hunter_test_string_not_empty("${HUNTER_CONFIG_SHA1}")
hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}")
hunter_test_string_not_empty("${HUNTER_VERSION}")
hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_SHA1}")
hunter_assert_not_empty_string("${cache_path}")

hunter_assert_not_empty_string("${HUNTER_CACHED_ROOT}")
hunter_assert_not_empty_string("${HUNTER_SHA1}")
hunter_assert_not_empty_string("${HUNTER_CONFIG_SHA1}")
hunter_assert_not_empty_string("${HUNTER_CONFIG_ID_PATH}")
hunter_assert_not_empty_string("${HUNTER_VERSION}")
hunter_assert_not_empty_string("${HUNTER_TOOLCHAIN_SHA1}")

if(EXISTS "${cache_path}")
return()
Expand Down
22 changes: 11 additions & 11 deletions cmake/modules/hunter_create_cache_meta_directory.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@

include(hunter_internal_error)
include(hunter_make_directory)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_create_cache_meta_directory cache_directory result)
hunter_test_string_not_empty("${HUNTER_ARGS_FILE}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_CONFIGURATION_TYPES}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_HOME_DIR}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_NAME}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_SHA1}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_VERSION}")
hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_ID_PATH}")
hunter_test_string_not_empty("${HUNTER_TOOLCHAIN_SHA1}")
hunter_test_string_not_empty("${cache_directory}")
hunter_test_string_not_empty("${result}")
hunter_assert_not_empty_string("${HUNTER_ARGS_FILE}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_CONFIGURATION_TYPES}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_HOME_DIR}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_NAME}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_SHA1}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_VERSION}")
hunter_assert_not_empty_string("${HUNTER_TOOLCHAIN_ID_PATH}")
hunter_assert_not_empty_string("${HUNTER_TOOLCHAIN_SHA1}")
hunter_assert_not_empty_string("${cache_directory}")
hunter_assert_not_empty_string("${result}")

string(COMPARE NOTEQUAL "${HUNTER_PACKAGE_COMPONENT}" "" has_component)

Expand Down
8 changes: 4 additions & 4 deletions cmake/modules/hunter_create_dependency_entry.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(CMakeParseArguments) # cmake_parse_arguments

include(hunter_internal_error)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_create_dependency_entry)
set(one PACKAGE COMPONENT RESULT)
Expand All @@ -14,9 +14,9 @@ function(hunter_create_dependency_entry)
# x_COMPONENT optional component
# x_RESULT optional component

hunter_test_string_not_empty("${x_PACKAGE}")
hunter_test_string_not_empty("${x_RESULT}")
hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}")
hunter_assert_not_empty_string("${x_PACKAGE}")
hunter_assert_not_empty_string("${x_RESULT}")
hunter_assert_not_empty_string("${HUNTER_CONFIG_ID_PATH}")

string(COMPARE NOTEQUAL "${x_COMPONENT}" "" has_component)
string(COMPARE NOTEQUAL "${x_UNPARSED_ARGUMENTS}" "" has_unparsed)
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/hunter_create_deps_info.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
include(hunter_create_dependency_entry)
include(hunter_get_package_deps_recurse)
include(hunter_internal_error)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)

function(hunter_create_deps_info temp_deps_info)
hunter_test_string_not_empty("${HUNTER_PACKAGE_NAME}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_NAME}")
string(COMPARE NOTEQUAL "${HUNTER_PACKAGE_COMPONENT}" "" has_component)

if(has_component)
Expand Down
20 changes: 10 additions & 10 deletions cmake/modules/hunter_download.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ include(hunter_register_dependency)
include(hunter_save_to_cache)
include(hunter_status_debug)
include(hunter_status_print)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)
include(hunter_upload_cache)
include(hunter_user_error)

Expand All @@ -43,13 +43,13 @@ function(hunter_download)
"${HUNTER_PACKAGE_NAME} versions available: ${versions}"
)

hunter_test_string_not_empty("${HUNTER_DOWNLOAD_SCHEME}")
hunter_test_string_not_empty("${HUNTER_SELF}")
hunter_assert_not_empty_string("${HUNTER_DOWNLOAD_SCHEME}")
hunter_assert_not_empty_string("${HUNTER_SELF}")

hunter_test_string_not_empty("${HUNTER_INSTALL_PREFIX}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_NAME}")
hunter_test_string_not_empty("${HUNTER_CONFIG_ID_PATH}")
hunter_test_string_not_empty("${HUNTER_CACHE_FILE}")
hunter_assert_not_empty_string("${HUNTER_INSTALL_PREFIX}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_NAME}")
hunter_assert_not_empty_string("${HUNTER_CONFIG_ID_PATH}")
hunter_assert_not_empty_string("${HUNTER_CACHE_FILE}")

string(COMPARE NOTEQUAL "${HUNTER_BINARY_DIR}" "" hunter_has_binary_dir)
string(COMPARE NOTEQUAL "${HUNTER_PACKAGE_COMPONENT}" "" hunter_has_component)
Expand Down Expand Up @@ -107,12 +107,12 @@ function(hunter_download)

set(HUNTER_PACKAGE_PROTECTED_SOURCES "${HUNTER_${h_name}_PROTECTED_SOURCES}")

hunter_test_string_not_empty("${HUNTER_PACKAGE_CONFIGURATION_TYPES}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_CONFIGURATION_TYPES}")

string(COMPARE EQUAL "${HUNTER_PACKAGE_URL}" "" hunter_no_url)

hunter_test_string_not_empty("${HUNTER_PACKAGE_URL}")
hunter_test_string_not_empty("${HUNTER_PACKAGE_SHA1}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_URL}")
hunter_assert_not_empty_string("${HUNTER_PACKAGE_SHA1}")

hunter_make_directory(
"${HUNTER_CACHED_ROOT}/_Base/Download/${HUNTER_PACKAGE_NAME}/${ver}"
Expand Down
4 changes: 2 additions & 2 deletions cmake/modules/hunter_download_cache_meta_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ include(hunter_internal_error)
include(hunter_private_data_password)
include(hunter_sleep_before_download)
include(hunter_status_debug)
include(hunter_test_string_not_empty)
include(hunter_assert_not_empty_string)
include(hunter_upload_password)
include(hunter_user_error)

function(hunter_download_cache_meta_file)
hunter_test_string_not_empty("${HUNTER_CACHED_ROOT}")
hunter_assert_not_empty_string("${HUNTER_CACHED_ROOT}")

cmake_parse_arguments(x "" "LOCAL;DONE" "" ${ARGV})
# -> x_LOCAL
Expand Down
Loading

0 comments on commit 60733ea

Please sign in to comment.