Colin D Bennett wrote:
Christian Convey wrote:
The online help says that we should use ADD_SUBDIRECTORY rather than
SUBDIRS, but that SUBDIRS still works.

Does anyone know why we're supposed to prefer ADD_SUBDIRECTORY?

Perhaps there is an effort to use consistent naming for command names,
where the name is a _verb_ describing the command.

Most (but not all) of the CMake command names are verbs. For example:
Try_run, Set_target_properties, Execute_process, Find_library, Include.
SUBDIRS is processed at the end of the current CMakeLists.txt file. ADD_SUBDIRECTORY is done immediately. So, if you set variables in the parent directory they will not be seen in the subdir when SUBDIRS is used.
-Bill

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to