May be more clean and efficient to use CMake property SOURCES:
For example:
add_library (MY_LIB src1.cpp src2.cpp)
get_target_property (lib_sources MY_LIB SOURCES)
And variable lib_sources now contains list of sources associated with target.
On 28/04/15 10:30, Roman Wüger
If someone is interessted in this solution:
set(FilenameUsedFiles ${CMAKE_BINARY_DIR}/UsedFiles.lst)
file(WRITE ${FilenameUsedFiles} )
function (parseArguments)
set(options)
set(oneValueArgs)
set(multiValueArgs)
cmake_parse_arguments(CFG ${options}${oneValueArgs}