linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #04671
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2646: make precompiled headers work again with GCC
------------------------------------------------------------
revno: 2646
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sun 2011-10-23 15:22:23 +0200
message:
make precompiled headers work again with GCC
modified:
SConstruct
build_util.py
geoip/SConscript
test/SConscript
win32/ConnectivityPage.cpp
win32/SConscript
win32/SettingsDialog.h
--
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 'SConstruct'
--- SConstruct 2011-10-16 23:06:25 +0000
+++ SConstruct 2011-10-23 13:22:23 +0000
@@ -75,11 +75,11 @@
opts.AddVariables(
EnumVariable('tools', 'Toolset to compile with, default = platform default (msvc under windows)', 'mingw', ['mingw', 'default']),
EnumVariable('mode', 'Compile mode', 'debug', ['debug', 'release']),
- BoolVariable('pch', 'Use pre-compiled headers', 'gcc' not in defEnv['TOOLS']),
+ BoolVariable('pch', 'Use precompiled headers', 'yes'),
BoolVariable('verbose', 'Show verbose command lines', 'no'),
BoolVariable('savetemps', 'Save intermediate compilation files (assembly output)', 'no'),
BoolVariable('unicode', 'Build a Unicode version which fully supports international characters', 'yes'),
- BoolVariable('i18n', 'Rebuild i18n files in debug build', 'no'),
+ BoolVariable('i18n', 'Rebuild i18n files', 'no'),
BoolVariable('help', 'Build help files (requires i18n=1)', 'yes'),
BoolVariable('webhelp', 'Build help files for the web (requires help=1)', 'no'),
BoolVariable('test', 'Build test suite', 'no'),
@@ -155,7 +155,7 @@
if env['unicode']:
env.Append(CPPDEFINES = ['UNICODE', '_UNICODE'])
-if env['CC'] == 'cl': # MSVC
+if 'msvc' in env['TOOLS']:
flags = msvc_flags
xxflags = msvc_xxflags
link_flags = msvc_link_flags
=== modified file 'build_util.py'
--- build_util.py 2011-10-16 23:06:25 +0000
+++ build_util.py 2011-10-23 13:22:23 +0000
@@ -115,8 +115,9 @@
# create a build environment and set up sources and targets.
def prepare_build(self, source_path, name, source_glob = '*.cpp', in_bin = True, precompiled_header = None):
+ build_path = self.get_build_path(source_path)
env = self.env.Clone()
- env.VariantDir(self.get_build_path(source_path), '.', duplicate = 0)
+ env.VariantDir(build_path, '.', duplicate = 0)
sources = self.get_sources(source_path, source_glob)
@@ -126,11 +127,15 @@
# the PCH/GCH builder will take care of this one
del sources[i]
- if env['CC'] == 'cl': # MSVC
+ if 'msvc' in env['TOOLS']:
env['PCHSTOP'] = precompiled_header + '.h'
- env['PCH'] = env.PCH(self.get_target(source_path, precompiled_header + '.pch', False), precompiled_header + '.cpp')[0]
+ env['PCH'] = env.PCH(build_path + precompiled_header + '.pch', precompiled_header + '.cpp')[0]
+
elif 'gcc' in env['TOOLS']:
- env['Gch'] = env.Gch(self.get_target(source_path, precompiled_header + '.gch', False), precompiled_header + '.h')[0]
+ env['Gch'] = env.Gch(build_path + precompiled_header + '.h.gch', precompiled_header + '.h')[0]
+
+ # little dance to add the pch object to include paths, while overriding the current directory
+ env['CXXCOM'] = env['CXXCOM'] + ' -include ' + env.Dir(build_path).abspath + '/' + precompiled_header + '.h'
return (env, self.get_target(source_path, name, in_bin), sources)
=== modified file 'geoip/SConscript'
--- geoip/SConscript 2011-10-16 23:06:25 +0000
+++ geoip/SConscript 2011-10-23 13:22:23 +0000
@@ -5,7 +5,7 @@
if dev.is_win32():
env.Append(CPPDEFINES = ['WIN32', '_WIN32_WINNT=0x501', '_WIN32_IE=0x501', 'WINVER=0x501', 'WIN32_LEAN_AND_MEAN', 'HAVE_STDINT_H=1', 'PACKAGE_VERSION=0'])
- if env['CC'] == 'cl': # MSVC
+ if 'msvc' in env['TOOLS']:
env.Append(CPPDEFINES = ['ssize_t=SSIZE_T'])
ret = dev.build_lib(env, target, sources, dev.c_lib)
=== modified file 'test/SConscript'
--- test/SConscript 2011-04-27 19:57:37 +0000
+++ test/SConscript 2011-10-23 13:22:23 +0000
@@ -10,7 +10,7 @@
env, target, sources = dev.prepare_build(source_path, 'gtest', source_glob="*.cpp", in_bin=False)
-if env['CC'] == 'cl': # MSVC
+if 'msvc' in env['TOOLS']:
if env['mode'] == 'debug':
env.Prepend(LIBS = ['ssleay32d', 'libeay32d'])
else:
@@ -43,4 +43,4 @@
ret = env.Command(dev.get_target(source_path, 'gtest.passed', in_bin=False), ret[0].abspath, runUnitTest)
-Return('ret')
\ No newline at end of file
+Return('ret')
=== modified file 'win32/ConnectivityPage.cpp'
--- win32/ConnectivityPage.cpp 2011-10-22 16:41:13 +0000
+++ win32/ConnectivityPage.cpp 2011-10-23 13:22:23 +0000
@@ -25,6 +25,7 @@
#include <dwt/widgets/Grid.h>
#include <dwt/widgets/GroupBox.h>
+#include <dwt/widgets/MessageBox.h>
#include "ConnectivityManualPage.h"
#include "resource.h"
=== modified file 'win32/SConscript'
--- win32/SConscript 2011-10-16 23:06:25 +0000
+++ win32/SConscript 2011-10-23 13:22:23 +0000
@@ -4,7 +4,7 @@
env, target, sources = dev.prepare_build(source_path, 'DCPlusPlus', precompiled_header = 'stdafx')
-if env['CC'] == 'cl': # MSVC
+if 'msvc' in env['TOOLS']:
if env['mode'] == 'debug':
env.Prepend(LIBS = ['ssleay32d', 'libeay32d'])
else:
=== modified file 'win32/SettingsDialog.h'
--- win32/SettingsDialog.h 2011-10-22 16:41:13 +0000
+++ win32/SettingsDialog.h 2011-10-23 13:22:23 +0000
@@ -20,6 +20,7 @@
#define DCPLUSPLUS_WIN32_SETTINGS_DIALOG_H
#include <dwt/widgets/ModalDialog.h>
+#include <dwt/widgets/Tree.h>
#include "PropPage.h"