[CMake] ADD_SUBDIRECTORY and EXCLUDE_FROM_ALL
cmake.cmake.narkive.com › wrjDKFh0 › addThe documentation for ADD_SUBDIRECTORY suggests states the following: If the EXCLUDE_FROM_ALL argument is provided then this subdirectory will not be included in build by default. Users will have to explicitly start a build in the generated output directory. This is useful for having cmake create a build system for a set of examples in a project.
[CMake] How to exclude some files from building?
cmake.org › pipermail › cmakeAt 2017-03-31 14:10:12, "Domen Vrankar" <domen.vrankar at gmail.com> wrote: 2017-03-31 4:41 GMT+02:00 kipade <kipade at 163.com>: There are some files I do not want to build if the specified condition was ture. For example, for testing, I want build a new file witch include a main entry just for testing; if not, a new file would be compile for ...
include — CMake 3.23.0-rc2 Documentation
cmake.org › cmake › helpThere is one exception to this: if the file which calls include() is located itself in the CMake builtin module directory, then first the CMake builtin module directory is searched and CMAKE_MODULE_PATH afterwards. See also policy CMP0017. See the cmake_policy() command documentation for discussion of the NO_POLICY_SCOPE option.