Build SubDirectories Separately
I am reorganizing my file directory and would love the option to build sub-projects separately. For example, if my project structure is:
-root
--project1
---inc
---src
--project2
---inc
---src
I would like the option to build project 1 irrespective of project 2. Can someone assist me with this? Thanks in advance
请先登录再写评论。
Don, I'm afraid it's not currently possible. Please follow CPP-1537 and leave a comment with your use-case there.
Have you checked out cmake's add_subdirectory() command? It may suit your needs.
Indeed, I have misinterpreted what you wanted. If you already have CMakeLists.txt that contains targets from both projects, you can just run and build them separately using run configurations. Otherwise you use command like add_executable to specify which files should be compiled into one target