diff options
author | Johel Ernesto Guerrero Peña <johelegp@gmail.com> | 2021-08-28 14:49:28 (GMT) |
---|---|---|
committer | Johel Ernesto Guerrero Peña <johelegp@gmail.com> | 2021-08-28 14:49:28 (GMT) |
commit | d186797cf6d084ad8c198475757aaa6a33ddbcc7 (patch) | |
tree | e210ac635d73dde214f149d86ba10e2ec59f102f /.gitignore | |
parent | 33d4ec1282c240a81e253924ca04ff58c0626f1a (diff) | |
download | CMake-d186797cf6d084ad8c198475757aaa6a33ddbcc7.zip CMake-d186797cf6d084ad8c198475757aaa6a33ddbcc7.tar.gz CMake-d186797cf6d084ad8c198475757aaa6a33ddbcc7.tar.bz2 |
Help: Fix regex in example of cmake-packages(7)
This change makes it work as intended as opposed to make the condition always true.
This can be confirmed by running the following script:
```
[johel@sundown tmp]$ cat x.cmake
function(f)
set(valid_inputs abc 123)
foreach(input ${ARGV})
if(";${valid_inputs};" MATCHES input)
message("old valid: ${input}")
endif()
if(";${valid_inputs};" MATCHES ";${input};")
message("new valid: ${input}")
endif()
endforeach()
endfunction()
f("0;z;123;12;abc;ab;13;ac")
set(_supported_components Plot Table)
set(ClimbingStats_FIND_COMPONENTS Plot Table P T)
foreach(_comp ${ClimbingStats_FIND_COMPONENTS})
if(NOT ";${_supported_components};" MATCHES _comp)
message("old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE \"Unsupported component: ${_comp}\")")
endif()
if(NOT ";${_supported_components};" MATCHES ";${_comp};")
message("new invalid: set(ClimbingStats_NOT_FOUND_MESSAGE \"Unsupported component: ${_comp}\")")
endif()
endforeach()
[johel@sundown tmp]$ cmake -P x.cmake
new valid: 123
new valid: abc
old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: Plot")
old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: Table")
old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: P")
new invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: P")
old invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: T")
new invalid: set(ClimbingStats_NOT_FOUND_MESSAGE "Unsupported component: T")
```
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions