Jean-Marc Lasgouttes wrote: > > The attached patch is needed nevertheless. It disabled assertions for me > > with mode=release. Jean-Marc, does it make sense? > > Well, I tried to understand how SConstruct works when you posted thqt on > trac, but I failed. Could you describe in a few words what you do?
SCons has the following check: if 'svn' in package_version: devel_version = True default_build_mode = 'debug' else: devel_version = False default_build_mode = 'release' This devel_version flag is used to specify the Installer name (devel installers get a date suffix), and it was used until my patch to enable assertions: custom_tests = [ (env.has_key('assertions') and env['assertions'] and devel_version, 'ENABLE_ASSERTIONS', 'Define if you want assertions to be enabled in the code' ), ], What I'd like to change is the latter check: Index: development/scons/SConstruct =================================================================== --- development/scons/SConstruct (Revision 30308) +++ development/scons/SConstruct (Arbeitskopie) @@ -743,7 +743,7 @@ #('newapis.h', 'HAVE_NEWAPIS_H', 'c'), ], custom_tests = [ - (env.has_key('assertions') and env['assertions'] and devel_version, + (env.has_key('assertions') and env['assertions'] and mode == 'debug', 'ENABLE_ASSERTIONS', 'Define if you want assertions to be enabled in the code' ), I think assertions should always be disabled if the build_mode is "release". Until now, they were only disabled if the version contained no "svn" tag (i.e., devel_version == False). So if you wanted to use the 1.6.4svn branch with disabled assertions, you could not do that, unless you changed the version to "1.6.4". OTOH I also think it should be possible to enable assertions in LyX 1.6.3. With my patch, you can also do this by using the mode=debug flag. I think this is more close to what we have in autotools, no? Jürgen