summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2004-08-19 20:13:57 (GMT)
committerSteven Knight <knight@baldmt.com>2004-08-19 20:13:57 (GMT)
commit3922ec6d7872716f529e09bf97cc9c4314a10ae4 (patch)
tree1a4f537e9a45e20004039e1f545bdf1bd8150ef4
parent25ab9907b429d307c67a9bf2077e714f39903029 (diff)
downloadSCons-3922ec6d7872716f529e09bf97cc9c4314a10ae4.zip
SCons-3922ec6d7872716f529e09bf97cc9c4314a10ae4.tar.gz
SCons-3922ec6d7872716f529e09bf97cc9c4314a10ae4.tar.bz2
Restore scanning of .pch files. (Anthony Roach)
-rw-r--r--src/CHANGES.txt7
-rw-r--r--src/engine/SCons/Tool/msvc.py3
-rw-r--r--test/msvc.py11
3 files changed, 19 insertions, 2 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 57a85fb..48016c4 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -10,7 +10,7 @@
RELEASE 0.97 - XXX
- From Steven Knight
+ From Steven Knight:
- Add a must_exist flag to Delete() to let the user control whether
it's an error if the specified entry doesn't exist. The default
@@ -20,6 +20,11 @@ RELEASE 0.97 - XXX
- Make the scons.bat REM statements into @REM so they aren't printed.
+ From Anthony Roach:
+
+ - Fix scanning of pre-compiled header (.pch) files for #includes,
+ broken in 0.96.
+
RELEASE 0.96 - Wed, 18 Aug 2004 13:36:40 +0000
diff --git a/src/engine/SCons/Tool/msvc.py b/src/engine/SCons/Tool/msvc.py
index ae67fdc..d81f64d 100644
--- a/src/engine/SCons/Tool/msvc.py
+++ b/src/engine/SCons/Tool/msvc.py
@@ -397,7 +397,8 @@ def shared_object_emitter(target, source, env):
return object_emitter(target, source, env,
SCons.Defaults.SharedObjectEmitter)
-pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter)
+pch_builder = SCons.Builder.Builder(action='$PCHCOM', suffix='.pch', emitter=pch_emitter,
+ source_scanner=SCons.Defaults.ObjSourceScan)
res_builder = SCons.Builder.Builder(action='$RCCOM', suffix='.res',
source_scanner=SCons.Defaults.ObjSourceScan)
SCons.Defaults.ObjSourceScan.add_scanner('.rc', SCons.Defaults.CScan)
diff --git a/test/msvc.py b/test/msvc.py
index 9f5171a..fe5bfee 100644
--- a/test/msvc.py
+++ b/test/msvc.py
@@ -84,6 +84,7 @@ test.write('foo.cpp', '''
test.write('StdAfx.h', '''
#include <windows.h>
#include <stdio.h>
+#include "resource.h"
''')
test.write('StdAfx.cpp', '''
@@ -167,6 +168,16 @@ slow = time.time() - start
# using precompiled headers should be significantly faster
assert fast < slow*0.8
+# Modifying resource.h should cause both the resource and precompiled header to be rebuilt:
+test.write('resource.h', '''
+#define IDS_TEST 2003
+''')
+
+test.not_up_to_date(arguments='test.res')
+test.not_up_to_date(arguments='StdAfx.pch')
+test.not_up_to_date(arguments='test.exe')
+test.run(program=test.workpath('test.exe'), stdout='2003 test 2\n')
+
##########
# Test a hierarchical build