file — CMake 3.23.0-rc3 Documentation
cmake.org › cmake › helpIf the file does not exist, it will be created. If the file already exists, WRITE mode will overwrite it and APPEND mode will append to the end. Any directories in the path specified by <filename> that do not exist will be created. If the file is a build input, use the configure_file() command to update the file only when its content changes.
if — CMake 3.23.0-rc3 Documentation
cmake.org › cmake › helpTrue if file1 is newer than file2 or if one of the two files doesn't exist. Behavior is well-defined only for full paths. If the file time stamps are exactly the same, an IS_NEWER_THAN comparison returns true, so that any dependent build operations will occur in the event of a tie. This includes the case of passing the same file name for both ...