Can CMake recognize CMakeLists.txt with another name (CMakeLists_nightly.txt)?

前端 未结 1 1055
名媛妹妹
名媛妹妹 2021-02-07 01:37

I am wanting to create CMakeLists.txt files that are more specifically named such as \"CMakeLists_nightly.txt\", \"CMakeLists_weekly.txt\" and so forth. The reason I want to do

1条回答
  •  梦谈多话
    2021-02-07 02:09

    Not really, but you can emulate this by putting CMakeLists.txt in separate directories, e.g. continous/CMakeLists.txt and nightly/CMakeLists.txt. Use INCLUDE to include the appropriate scripts for each of the build configs.

    Consider if this really is the right approach - completely separating the nightly and continuous script is a really bad idea as that will lead to duplication and a very bug prone build setup.

    0 讨论(0)
提交回复
热议问题