0

I would like to use list operation with REMOVE_ITEM and multiple values in order to remove the file names of temporary files which are created by Emacs.

aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/src SOURCES) file(GLOB TMP_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/.#*") list(REMOVE_ITEM SOURCES TMP_FILES) 

But list does not accept list as an argument, so the example above does not work as expected.

How do I expand a list to multiple values in this case?

Ref. http://www.cmake.org/cmake/help/v3.0/command/list.html

1 Answer 1

1

In the list command you want the value of the variable TMP_FILES so you should use :

list(REMOVE_ITEM SOURCES ${TMP_FILES}) 
Sign up to request clarification or add additional context in comments.

1 Comment

Thank you very much. It was just my easy mistake! It now works as expected.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.