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

 

 

3 comments
Comment actions Permalink

Don, I'm afraid it's not currently possible. Please follow CPP-1537 and leave a comment with your use-case there.

0
Comment actions Permalink

Have you checked out cmake's add_subdirectory() command? It may suit your needs.

0
Comment actions Permalink

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

0

Please sign in to leave a comment.