cmake: read and compile dynamically-generated list of cpp files

前端 未结 3 612
既然无缘
既然无缘 2021-01-18 15:17

I have a custom tool that processes a given list of IDL files and produces a number of .cpp and .h files as output. I want to add those files to the list of things to compil

3条回答
  •  北恋
    北恋 (楼主)
    2021-01-18 15:28

    There is a function that build the list directly from file:

    file(STRINGS   [...])
    

    source: https://cmake.org/cmake/help/v3.11/command/file.html

提交回复
热议问题