composable_kernel
composable_kernel copied to clipboard
Enumerate source files automatically (as add_library()/add_executable() argument)
For the targets like ckProfiler, I found that existing source files and the add_executable()
arguments are identical. We can see same symptom in the instance libraries:
- First argument of
add_instance_library()
should be written in form of device_<folder name>_instance (hard-coded in upper level CMakeLists.txt). It's not a name developers can choose. - Rest arguments of
add_instance_library()
are same as the files which already set in the folder.
To reduce human errors and tedious works, I think we can list all the necessary files by file()
and generate target names from the sub-folder names.