[CMake] Passing a var to a macro

Leopold Palomo Avellaneda leo at alaxarxa.net
Sun Mar 30 14:13:27 EDT 2008


Hi,

I'm creating a macro and I'm having an stupid problem that I don't know how to 
solve. For example, in this code:


file(GLOB plugin_STR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.c *.cpp *.cxx *.h 
*.hpp)
message (STATUS "Files to process in the macro ${plugin_STR}")

I obtain a list of several files.

but if I do:

file(GLOB plugin_STR  *.c *.cpp *.cxx *.h *.hpp)
PRINT_VALUES(${plugin_STR})

where:

macro(PRINT_VALUES  list)
	message (STATUS "Files to process in the macro PRINT_VALUES ${list}")
endmacro(CREATE_FILE_LIST)


then I get _only_  the first value of the list. 

Please, what do I do wrongly?

Or, what do I have to do to pass a list of values in a macro?

Regards,

Leo



-- 
--
Linux User 152692
PGP: 0xF944807E
Catalonia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080330/fdfed8e2/attachment.pgp>


More information about the CMake mailing list