cmake: struggling with add_custom_command dependencies

后端 未结 4 1028
面向向阳花
面向向阳花 2021-02-12 23:06

I\'m trying to get a file produced by an add_custom_command in one directory to be a dependency of an add_custom_command in another directory.

In the first directory (li

4条回答
  •  故里飘歌
    2021-02-12 23:28

    try to add following command into second directory:

    set_source_files_properties(${PROJECT_BINARY_DIR}/lib/core/libcore.bc PROPERTIES GENERATED TRUE)
    

    I solved my problem with this command. a relating link: https://cmake.org/cmake/help/latest/prop_sf/GENERATED.html

提交回复
热议问题