[CMake] Don't understand simple code

Denis Scherbakov denis_scherbakov at yahoo.com
Mon May 11 12:03:37 EDT 2009


MACRO(MYTEST argTemp)
  LIST(LENGTH argTemp varLen)
  MESSAGE("Len: ${varLen}")
  
  SET (argTemp "${argTemp}")
  
  LIST(LENGTH argTemp varLen)
  MESSAGE("Len: ${varLen}")
ENDMACRO ()

MYTEST("something;new")

# prints: 0, 2

Am I referring variables in MACRO correctly? Why second version prints correct length and the first - not?

Denis


      


More information about the CMake mailing list