Hello list, I have a project with subfolders that should be selectively built and installed. The problem ist that there are various dependencies between them.
At the moment I have a list-variable that contains the targets I want to be built and the folders are included depending on this list: $ cmake -DWANTED="this;that" A folder is included with ADD_SUBDIRECTORY if it is explicitly named in the list or is needed as dependency of another target - done with multiple LIST(FIND) commands. This way I'm functionally recreating the dependency list that is also built by ADD_DEPENDENCIES and TARGET_LINK_LIBRARIES. I searched the documentation for a better solution, but found only these things that seem related at first glance but don't do what I want: - Using EXCLUDE_FROM_ALL in ADD_SUBDIRECTORY, ADD_EXECUTABLE or ADD_LIBRARY. This should handle dependencies, but the docs say: "Installing a target with EXCLUDE_FROM_ALL set to true has undefined behavior." - Using COMPONENT in INSTALL commands. Does not affect compilation, just installation and does not handle dependencies. So my question: Am I missing something or is it not possible to do selective build and install without the fuss of recreating the dependencies? Thanks Stefan -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake