ecbuild_separate_sources
Separate a given list of sources according to language.
ecbuild_separate_sources( TARGET <name>
SOURCES <source1> [ <source2> ... ] )
Options
- TARGETrequired
base name for the CMake output variables to set
- SOURCESrequired
list of source files to separate
Output variables
If any file of the following group of extensions is present in the list of sources, the corresponding CMake variable is set:
- <target>_h_srcs:
source files with extension .h, .hxx, .hh, .hpp, .H .tcc .txx .tpp
- <target>_c_srcs:
source files with extension .c
- <target>_cxx_srcs:
source files with extension .cc, .cxx, .cpp, .C
- <target>_fortran_srcs:
source files with extension .f, .F, .for, f77, .f90, .f95, .F77, .F90, .F95
- <target>_cuda_srcs:
source files with extension .cu