Can one add further source files to an executable once defined?

后端 未结 3 1858
故里飘歌
故里飘歌 2021-02-02 06:13

Given I have defined an executable with its main source file in a CMakeList.txt file:

ADD_EXECUTABLE(MyExampleApp main.cpp)

Can I

3条回答
  •  旧时难觅i
    2021-02-02 06:43

    It should be noted that for more recent versions of CMake (> 3.1 I think) one can append files to the SOURCES property on targets.

    http://www.cmake.org/cmake/help/v3.3/prop_tgt/SOURCES.html

提交回复
热议问题