We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
if(... IN_LIST ...)
1 parent 2d368df commit 1341b4bCopy full SHA for 1341b4b
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