Skip to content

Commit

Permalink
scons: Sort help text with a custom function that will run on Python 3
Browse files Browse the repository at this point in the history
(cherry-picked from commit 6b67c18)
  • Loading branch information
irydacea committed Oct 7, 2018
1 parent 2584a21 commit cdae501
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion SConstruct
Expand Up @@ -182,6 +182,9 @@ if env['ccache']: env.Tool('ccache')
boost_version = '1.56.0'


def SortHelpText(a, b):
return (a > b) - (a < b)

Help("""Arguments may be a mixture of switches and targets in any order.
Switches apply to the entire build regardless of where they are in the order.
Important switches include:
Expand Down Expand Up @@ -232,7 +235,7 @@ specifying --option-cache=FILE command line argument. Current option values can
If you set CXXFLAGS and/or LDFLAGS in the environment, the values will
be appended to the appropriate variables within scons.
""" + opts.GenerateHelpText(env, sort=cmp))
""" + opts.GenerateHelpText(env, sort=SortHelpText))

if GetOption("help"):
Return()
Expand Down

0 comments on commit cdae501

Please sign in to comment.