composable_kernel icon indicating copy to clipboard operation
composable_kernel copied to clipboard

Enumerate source files automatically (as add_library()/add_executable() argument)

Open poyenc opened this issue 2 years ago • 0 comments

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.

poyenc avatar Sep 28 '22 07:09 poyenc