Fixed InstallWithSuffix crash if some binaries are disabled.
Worked around scons bug that caused spurious success of C++ check.
This commit is contained in:
parent
1062758361
commit
eea4f0737f
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,7 @@ def CheckCPlusPlus(context, gcc_version = None):
|
|||
\n""" % version_num
|
||||
message += "... "
|
||||
context.Message(message)
|
||||
if context.TryBuild(context.env.Program, test_program, ".cpp") == 1:
|
||||
if context.TryBuild(context.env.Program, test_program, ".cpp") == 1 and context.lastTarget.get_contents() != "":
|
||||
context.Result("yes")
|
||||
return True
|
||||
else:
|
||||
|
@ -647,6 +647,8 @@ def InstallFilteredHook(target, source, env):
|
|||
env.Append(BUILDERS={'InstallFiltered':Builder(action=InstallFilteredHook)})
|
||||
|
||||
def InstallWithSuffix(env, target, source):
|
||||
if not source:
|
||||
return source
|
||||
return env.InstallAs(os.path.join(target, source[0].name + env["program_suffix"]), source)
|
||||
|
||||
#env.AddMethod(InstallWithSuffix)
|
||||
|
|
Loading…
Add table
Reference in a new issue