summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorJohel Ernesto Guerrero Peña <johelegp@gmail.com>2021-08-28 14:49:28 (GMT)
committerJohel Ernesto Guerrero Peña <johelegp@gmail.com>2021-08-28 14:49:28 (GMT)
commitd186797cf6d084ad8c198475757aaa6a33ddbcc7 (patch)
treee210ac635d73dde214f149d86ba10e2ec59f102f /.gitignore
parent33d4ec1282c240a81e253924ca04ff58c0626f1a (diff)
downloadCMake-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