Write command line options into a separate file to be able to
reconfigure from scatch in the case coredata cannot be loaded. The most
common case is when we are reconfiguring with a newer meson version.
This means that we should try as much as possible to maintain backward
compatibility for the cmd_line.txt file format.
The main difference with a normal reconfigure is it will use new
default options values and will read again environment variables like
CFLAGS, etc.
load_fail_msg='Coredata file {!r} is corrupted. Try with a fresh build tree.'.format(filename)
@ -470,7 +510,8 @@ def load(build_dir):
ifnotisinstance(obj,CoreData):
raiseMesonException(load_fail_msg)
ifobj.version!=version:
raiseMesonException('Build directory has been generated with Meson version %s, which is incompatible with current version %s.\nPlease delete this build directory AND create a new one.'%
raiseMesonException('Build directory has been generated with Meson version %s, '
'which is incompatible with current version %s.\n'%