[CMake] How to check if a file is a source file?

Robert Dailey rcdailey.lists at gmail.com
Mon Aug 26 13:10:04 EDT 2013


I have a common function defined that creates targets for me. I pass
in a big list of source files. Within here are resource files (.RC),
header files (.H) and source files (.CPP). However, I know that CPP
files can take many extensions, so I want to create a thorough, safe
check.

Does CMake have a pre-built command or function to allow me to check a
list of files for source files? I can write my own of course but I
want to see if CMake has something first. Thanks.


More information about the CMake mailing list