[Cmake] INCLUDE (file OPTIONAL)

Bill Hoffman bill.hoffman at kitware.com
Thu Jun 21 10:33:49 EDT 2001


I have changed the INCLUDE command to only take one file and to
have an extra optional argument called OPTIONAL.   If the OPTIONAL
argument is present, then INCLUDE does not complain if the file does
not exist.   You could use this to include things from a home directory.


It could be used like this:

INCLUDE (${PROJECT_BINARY_DIR}/UserCacheSettings.txt OPTIONAL)

This would allow the user to pre-set values for the Cache file, but still
be able to delete the Cache file.

-Bill






More information about the CMake mailing list