We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
if(... IN_LIST ...)
1 parent 2445808 commit 6a58b48Copy full SHA for 6a58b48
cmake/CheckStringOptionValue.cmake
@@ -1,11 +1,9 @@
1
function(check_string_option_value option)
2
get_property(expected_values CACHE ${option} PROPERTY STRINGS)
3
if(expected_values)
4
- foreach(value IN LISTS expected_values)
5
- if(value STREQUAL "${${option}}")
6
- return()
7
- endif()
8
- endforeach()
+ if(${option} IN_LIST expected_values)
+ return()
+ endif()
9
message(FATAL_ERROR "${option} value is \"${${option}}\", but must be one of ${expected_values}.")
10
endif()
11
message(AUTHOR_WARNING "The STRINGS property must be set before invoking `check_string_option_value' function.")
0 commit comments