Russel Winder avatar Russel Winder committed 7184d3d Draft Merge

Merge from mainline.

Comments (0)

Files changed (4)

 
 barsrc = [
     'BarObject.cpp',
+    'BarPCH.obj',
     'bar.cpp',
     local.RES('bar.rc', RCFLAGS= '/I${SOURCE.srcdir}'),
     ]
                     source = barsrc,
                     PCH=local.PCH('BarPCH.cpp', CXXFLAGS='/nologo')[0],
                     PCHSTOP = 'BarPCH.h',
-                    register=1)
+                    register=0) # can't test registration, Win7 requires elevation for that.
 """)
 
 test.write('src/BarObject.cpp','''
 test.write('src/BarPCH.cpp','''
 #include "BarPCH.h"
 
-#ifdef _ATL_STATIC_REGISTRY
-#include <statreg.h>
-#include <statreg.cpp>
-#endif
+// #ifdef _ATL_STATIC_REGISTRY
+// #include <statreg.h>
+// #include <statreg.cpp>
+// #endif
 
-#include <atlimpl.cpp>
+// #include <atlimpl.cpp>
 ''')
 
 test.write('src/BarPCH.h','''
 
 #define STRICT
 #ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0400
+#define _WIN32_WINNT 0x0501
 #endif
 #define _ATL_APARTMENT_THREADED
 
 LIBRARY      "bar.DLL"
 
 EXPORTS
-        DllCanUnloadNow     @1 PRIVATE
-        DllGetClassObject   @2 PRIVATE
-        DllRegisterServer   @3 PRIVATE
-        DllUnregisterServer     @4 PRIVATE
+        DllCanUnloadNow      PRIVATE
+        DllGetClassObject    PRIVATE
+        DllRegisterServer    PRIVATE
+        DllUnregisterServer  PRIVATE
 ''')
 
 test.write('src/bar.idl','''

test/MSVS/CPPPATH-Dirs.py

 
 test.run()
 
-test.must_exist(test.workpath('Hello.vcproj'))
+if not os.path.exists(test.workpath('Hello.vcproj')) and \
+        not os.path.exists(test.workpath('Hello.vcxproj')):
+    test.fail_test("Failed to create Visual Studio project Hello.vcproj or Hello.vcxproj")
 test.must_exist(test.workpath('Hello.sln'))
 # vcproj = test.read('Test.vcproj', 'r')
 

test/MinGW/MinGWSharedLibrary.py

 import sys
 import TestSCons
 
+import SCons.Tool.mingw
+import SCons.Defaults
+
 _python_ = TestSCons._python_
 
 test = TestSCons.TestSCons()
 if sys.platform not in ('cygwin','win32',):
     test.skip_test("Skipping mingw test on non-Windows %s platform."%sys.platform)
 
+if not SCons.Tool.mingw.find(SCons.Defaults.DefaultEnvironment()):
+    test.skip_test("Skipping mingw test, no MinGW found.\n")
+
 
 test.write('foobar.cc', """
 int abc(int a) {

test/MinGW/WINDOWS_INSERT_DEF.py

 import sys
 import TestSCons
 
+import SCons.Tool.mingw
+import SCons.Defaults
+
 test = TestSCons.TestSCons()
 
 if sys.platform not in ('cygwin', 'win32'):
     test.skip_test(
         "Skipping mingw test on non-Windows platform: %s" % sys.platform)
 
+if not SCons.Tool.mingw.find(SCons.Defaults.DefaultEnvironment()):
+    test.skip_test("Skipping mingw test, no MinGW found.\n")
+
 test.write('hello.c', r"""
 #include <stdio.h>
 int hello_world(void) { return printf("Orbis, te saluto!\n"); }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.