Regex with `*` behaves unexpectedly
When I check if regex "Darwin-12*" matches "Darwin-15.0.0", the result is True. I would expect the result to be False. Sorry, if I am missing something very obvious.
set(str Darwin-15.0.0)
if(str MATCHES "Darwin-12*")
message("${str} matches Darwin-12*")
else()
message("${str} DOES NOT match Darwin-12*")
endif()
$ cmake .
Darwin-15.0.0 matches Darwin-12*
-- Configuring done
-- Generating done
-- Build files have been written to: <REDACTED>
$ cmake --version
cmake version 3.6.3
CMake suite maintained and supported by Kitware (kitware.com/cmake).
Edited by shadow_walker