Skip to content

Commit

Permalink
Merge pull request TriBITSPub#1 from bartlettroscoe/464-tribits_add_a…
Browse files Browse the repository at this point in the history
…dvanced_typo_fixes

Fixed typo mistake seen in PR 464
  • Loading branch information
bartlettroscoe authored Mar 20, 2022
2 parents ace338e + f48d274 commit 975ffa8
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 18 deletions.
4 changes: 0 additions & 4 deletions test/core/CTestScriptsUnitTests/echoEnvVars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,10 @@ set(maxNumEnvVars 10)
cmake_policy(SET CMP0054 NEW)

foreach(idx RANGE ${maxNumEnvVars})
#message("\nidx = '${idx}'")
set(envVarCacheVarName_idx "ENV_VAR_${idx}")
#message("envVarCacheVarName_idx = '${envVarCacheVarName_idx}'")
set(envVarName_idx "${${envVarCacheVarName_idx}}")
if (NOT "${envVarName_idx}" STREQUAL "")
#message("envVarName_idx = '${envVarName_idx}'")
set(envVarValue_idx "$ENV{${envVarName_idx}}")
#message("envVarValue_idx = '${envVarValue_idx}'")
message("${envVarName_idx} = '${envVarValue_idx}'")
endif()
endforeach()
2 changes: 1 addition & 1 deletion test/core/ExamplesUnitTests/replace_string.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CMake -P script to repalce a string in a text file with another string.
# CMake -P script to replace a string in a text file with another string.
#
# Usage:
#
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/package_arch/TribitsAddAdvancedTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ include(PrintVar)
# separator ``'<sep>'`` and pass in ``LIST_SEPARATOR <sep>`` so ``<sep>``
# will be replaced with ``';'`` at point of usage. If the env var values
# contain any spaces, also quote the entire variable/value pair as
# ``"<vari>=<valuei>"``. For example, the evn var and value
# ``"<vari>=<valuei>"``. For example, the env var and value
# ``my_env_var="arg1 b;arg2;I have spaces"`` would need to be passed as
# ``"my_env_var=arg1 b<sep>arg2<sep>I have spaces"``.
#
Expand Down
4 changes: 2 additions & 2 deletions tribits/core/package_arch/TribitsAddTest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ include(TribitsAddTestHelpers)
# Tests (tribits_add_test())`_ for more details and examples.
#
# Note that one of the `<postfix>` arguments can be empty, in which case
# the basse test name is not appended so::
# the base test name is not appended so::
#
# POSTIFX_AND_ARGS_0 "" --arg1 --arg2=dummy
#
Expand Down Expand Up @@ -371,7 +371,7 @@ include(TribitsAddTestHelpers)
# separator ``'<sep>'`` and pass in ``LIST_SEPARATOR <sep>`` so ``<sep>``
# will be replaced with ``';'`` at point of usage. If the env var values
# contain any spaces, also quote the entire variable/value pair as
# ``"<vari>=<valuei>"``. For example, the evn var and value
# ``"<vari>=<valuei>"``. For example, the env var and value
# ``my_env_var="arg1 b;arg2;I have spaces"`` would need to be passed as
# ``"my_env_var=arg1 b<sep>arg2<sep>I have spaces"``.
#
Expand Down
5 changes: 0 additions & 5 deletions tribits/core/package_arch/TribitsGeneralMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,6 @@ endfunction()
#
function(tribits_check_for_unparsed_arguments)

#print_var(ARGC)

if ("${ARGC}" GREATER 1)
MESSAGE(FATAL_ERROR
"ERROR tribits_check_for_unparsed_arguments() passed arguments '${ARGV}' but only accepts 0 or 1 arguments (for the <prefix>)")
Expand All @@ -577,9 +575,6 @@ function(tribits_check_for_unparsed_arguments)
foreach(arg ${ARGV})
set(prefix "${arg}")
endforeach()
#print_var(prefix)

#print_var(${prefix}_UNPARSED_ARGUMENTS)

if( NOT "${${prefix}_UNPARSED_ARGUMENTS}" STREQUAL "")
message_wrapper(
Expand Down
2 changes: 1 addition & 1 deletion tribits/core/utils/AssertDefined.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ function(assert_defined VARS)
endforeach()
endfunction()

# ToDo: The VARS arg This really needs to be repalced with ${ARGV}. I fear
# ToDo: The VARS arg This really needs to be replaced with ${ARGV}. I fear
# that only the first arg passed in is asserted. However, to change this now
# is breaking backward compatibility.
6 changes: 3 additions & 3 deletions tribits/core/utils/ParseVariableArguments.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,12 @@ endmacro()

# NOTE: If the above function turns out to be a performance bottle neck, there
# are a few things that could be done to improve performance. One thing you
# could do is repalce the o(len(arg_names)) and o(len(option_names)) lookups
# could do is replace the o(len(arg_names)) and o(len(option_names)) lookup
# with o(1) lookups by creating CMake variables of the name
# ${OUTER_FUNC_NAME}_arg_<argNamei> and then just look of that variable exists
# or not. That should use a hash function. That might actually slow things
# down for short lists however so we would have to measure, measure,
# measure. I would have to pass in the function/macro name to disabiguate
# the variable names. It would really be better if cmake would provide a
# measure. I would have to pass in the function/macro name to disambiguate
# the variable names. It would really be better if CMake would provide a
# sorted list find operation. That would make this much faster for large
# numbers of argument and option names.
2 changes: 1 addition & 1 deletion tribits/core/utils/TribitsPrintList.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ include_guard()

# @FUNCTION: tribits_print_list()
#
# Unconditionally the name and values of a listg var.
# Unconditionally the name and values of a list var.
#
# Usage::
#
Expand Down

0 comments on commit 975ffa8

Please sign in to comment.