Regex AND support
Operation AND on Perl regex could be expressed as:
perl -e "q{some stuff and things} =~ /(?=some)(?=stuff)(?=things)/ ? print 'yes' : print 'no'" prints 'no'
(See https://stackoverflow.com/questions/469913/regular-expressions-is-there-an-and-operator for more details)
Looks this syntax is not supported by Cmake. This example:
if(CMAKE_BUILD_TYPE MATCHES (?=x86_64)(?=linux))
#do stuff
endif()
Give error on compilation:
CMake Error at configurations.cmake:137 (if):
if given arguments:
"CMAKE_BUILD_TYPE" "MATCHES" "(" "?=x86_64" ")" "(" "?=linux" ")"
Unknown arguments specified
And now i see only way for AND:
if(CMAKE_BUILD_TYPE MATCHES x86_64 AND CMAKE_BUILD_TYPE MATCHES linux)
#do stuff
endif()
It looks bad on two AND operands and will looks ugly on more operands