the arguments so the /Fo is towards the beginning of the line
(like it is for $CCCOM, $CXXCOM, etc.).
git-svn-id: http://scons.tigris.org/svn/scons/trunk@3990
fdb21ef1-2011-0410-befe-
b5e4ea1792b1
- Fix finding #include files when the string contains escaped
backslashes like "C:\\some\\include.h".
+ - Pass $CCFLAGS to Visual C/C++ precompiled header compilation.
+
From Robert P. J. Day:
- User's Guide updates.
will no longer work at all, and will instead generate specific
fatal errors when anyone tries to use them.
+ Please note the following important changes since release 1.2.0:
+
+ -- VISUAL C/C++ PRECOMPILED HEADERS WILL BE REBUILT
+
+ Precompiled header files built with Visual C/C++ will be
+ rebuilt after upgrading from 1.2.0.
+
+ This rebuild is normal will occur because the command line
+ defined by the $PCHCOM construction variable has had the
+ $CCFLAGS variable added, and has been rearranged to put the
+ "/Fo" output flag towards the beginning of the line, consistent
+ with the related command lines for $CCCOM, $CXXCOM, etc.
+
Please note the following important changes since release 1.1.0:
-- THE $CHANGED_SOURCES, $CHANGED_TARGETS, $UNCHANGED_SOURCES
env['CXXFILESUFFIX'] = '.cc'
env['PCHPDBFLAGS'] = SCons.Util.CLVar(['${(PDB and "/Yd") or ""}'])
- env['PCHCOM'] = '$CXX $CXXFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Fo${TARGETS[1]} /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS'
+ env['PCHCOM'] = '$CXX /Fo${TARGETS[1]} $CXXFLAGS $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c $SOURCES /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS'
env['BUILDERS']['PCH'] = pch_builder
if not env.has_key('ENV'):
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+"""
+Verify basic invocation of Microsoft Visual C/C++, including use
+of a precompiled header with the $CCFLAGS variable.
+"""
+
import os
import sys
import time
import os
env = Environment()
env.Append(CPPPATH=os.environ.get('INCLUDE', ''),
- LIBPATH=os.environ.get('LIB', ''))
+ LIBPATH=os.environ.get('LIB', ''),
+ CCFLAGS='/DPCHDEF')
env['PDB'] = File('test.pdb')
env['PCHSTOP'] = 'StdAfx.h'
env['PCH'] = env.PCH('StdAfx.cpp')[0]
test.write('StdAfx.cpp', '''
#include "StdAfx.h"
+#ifndef PCHDEF
+this line generates an error if PCHDEF is not defined!
+#endif
''')
# Visual Studio 8 has deprecated the /Yd option and prints warnings