Last active
May 12, 2016 01:36
-
-
Save MambaWong/bb3364105cce2dc87499695a9a0be701 to your computer and use it in GitHub Desktop.
check if a list has at least 2 elements(regex matches)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check if a list has at least 2 elements(regex matches) | |
cmake_minimum_required(VERSION 3.3) | |
macro(test) | |
set(var ${ARGN}) | |
if(var MATCHES ";") | |
message(${ARGN} ": YES") | |
else() | |
message(${ARGN} ": NO") | |
endif() | |
endmacro() | |
test(a b c d) # abcd: YES | |
test("a b c d") # a b c d: NO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment