← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2897: fix spurious pch rebuilds

 

------------------------------------------------------------
revno: 2897
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Thu 2012-04-12 17:21:50 +0200
message:
  fix spurious pch rebuilds
modified:
  build_util.py


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'build_util.py'
--- build_util.py	2012-03-03 15:04:23 +0000
+++ build_util.py	2012-04-12 15:21:50 +0000
@@ -129,6 +129,9 @@
 		sources = self.get_sources(source_path, source_glob, recursive)
 
 		if precompiled_header is not None and env['pch'] and not env['msvcproj']:
+			# TODO we work around the 2 problems described on
+			# <http://scons.tigris.org/issues/show_bug.cgi?id=2680> - remove once not needed
+
 			for i, source in enumerate(sources):
 				if source.find(precompiled_header + '.cpp') != -1:
 					# the PCH/GCH builder will take care of this one
@@ -138,7 +141,8 @@
 				env['PCHSTOP'] = precompiled_header + '.h'
 				pch = env.PCH(build_path + precompiled_header + '.pch', precompiled_header + '.cpp')
 				env['PCH'] = pch[0]
-				sources.append(pch[1])
+				env['ARFLAGS'] = env['ARFLAGS'] + ' ' + str(pch[1])
+				env['LINKFLAGS'] = env['LINKFLAGS'] + ' ' + str(pch[1])
 
 			elif 'gcc' in env['TOOLS']:
 				env['Gch'] = env.Gch(build_path + precompiled_header + '.h.gch', precompiled_header + '.h')[0]