Use uppercase value. Make less verbose.

Signed-off-by: Steven Hahn <hahnse@ornl.gov>
This commit is contained in:
Steven Hahn 2021-04-09 14:47:25 -04:00
parent 05506d0ac6
commit 7c826c32eb
1 changed files with 2 additions and 2 deletions

View File

@ -21,11 +21,11 @@ ENDFUNCTION()
FUNCTION(CHECK_PYTHON_REQS module_list test_name add_test)
set(${add_test} true PARENT_SCOPE)
foreach(python_module IN LISTS ${module_list})
set(cached_result has_${python_module}_python_module)
string(TOUPPER ${python_module} module_uppercase)
set(cached_result HAS_${module_uppercase}_PYTHON_MODULE)
if (NOT DEFINED ${cached_result})
TEST_PYTHON_MODULE(${python_module} ${cached_result})
endif ()
message(${cached_result} " = " ${${cached_result}})
if (NOT(${cached_result}))
if (test_name)
MESSAGE("Missing python module ${python_module}, not adding test ${test_name}")