external/cppunit/ExternalProject_cppunit.mk |    8 +++-----
 external/cppunit/UnpackedTarball_cppunit.mk |    1 +
 external/cppunit/enable-win32-debug.patch   |   18 ++++++++++++++++++
 sal/cppunittester/cppunittester.cxx         |    1 +
 solenv/gbuild/platform/com_MSC_class.mk     |    2 +-
 solenv/gbuild/platform/com_MSC_defs.mk      |    4 ++++
 6 files changed, 28 insertions(+), 6 deletions(-)

New commits:
commit a7653da3317c4e1a52f6152f42d3d9fe3170918e
Author: Michael Meeks <[email protected]>
Date:   Sat May 24 17:21:39 2014 +0100

    Win32: fix cppunit test strangeness.
    
    Appending items to our search path for libraries leaves us vulnerable
    to similarly named libraries in the system. In my case some
    $HOME/AMD APP SDK/2.9/bin/x86/glew32.dll presumably incompatible
    with our internal version. Hence prepend important path elements to
    better match our program/ setup at run-time.
    
    Change-Id: Iecf266a9d14d71de6c2e402793339e579ec0b987

diff --git a/solenv/gbuild/platform/com_MSC_class.mk 
b/solenv/gbuild/platform/com_MSC_class.mk
old mode 100644
new mode 100755
index fb617ac..60fb59e
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -364,7 +364,7 @@ endef
 # CppunitTest class
 
 gb_CppunitTest_DEFS := -D_DLL
-gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path):"$(shell cygpath 
-u $(gb_Library_DLLDIR)):$(shell cygpath -u 
$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if 
$(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll))"
+gb_CppunitTest_CPPTESTPRECOMMAND := $(call gb_Helper_prepend_ld_path,$(shell 
cygpath -u $(gb_Library_DLLDIR)):$(shell cygpath -u 
$(WORKDIR)/UnpackedTarball/cppunit/src/cppunit/$(if 
$(MSVC_USE_DEBUG_RUNTIME),DebugDll,ReleaseDll)))
 
 gb_CppunitTest_get_filename = test_$(1).dll
 gb_CppunitTest_get_ilibfilename = itest_$(1).lib
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk 
b/solenv/gbuild/platform/com_MSC_defs.mk
old mode 100644
new mode 100755
index 36c14e9..6e590b5
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -289,4 +289,8 @@ gb_LTOFLAGS := $(if $(filter TRUE,$(ENABLE_LTO)),-GL)
 
 gb_Helper_set_ld_path := PATH="$$PATH:$(shell cygpath -u 
$(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u 
$(INSTDIR)/$(LIBO_BIN_FOLDER))"
 
+define gb_Helper_prepend_ld_path
+PATH="$(shell cygpath -u $(INSTDIR)/$(LIBO_URE_LIB_FOLDER)):$(shell cygpath -u 
$(INSTDIR)/$(LIBO_BIN_FOLDER)):$(1):$$PATH"
+endef
+
 # vim: set noet sw=4:
commit 02638a0865271959e7a424622088eb502721e24c
Author: Michael Meeks <[email protected]>
Date:   Sat May 24 13:39:59 2014 +0100

    cppunit: always compile with debugging symbols on windows.
    
    Also cleanup some makefile pieces and give better error warnings.
    
    Change-Id: I9f20d60f26d5828f60664941946c266c7d166f32

diff --git a/external/cppunit/ExternalProject_cppunit.mk 
b/external/cppunit/ExternalProject_cppunit.mk
index 9a163e7..30a5905 100644
--- a/external/cppunit/ExternalProject_cppunit.mk
+++ b/external/cppunit/ExternalProject_cppunit.mk
@@ -13,15 +13,13 @@ $(eval $(call gb_ExternalProject_register_targets,cppunit,\
        build \
 ))
 
-
 ifeq ($(OS)$(COM),WNTMSC)
 $(call gb_ExternalProject_get_state_target,cppunit,build) :
        $(call gb_ExternalProject_run,build,\
-               msbuild.exe cppunit_dll.vcxproj /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-               $(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp 
/p:VisualStudioVersion=11.0) \
+           PROFILEFLAGS="$(if $(MSVC_USE_DEBUG_RUNTIME),Debug,Release) $(if 
$(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp /p:VisualStudioVersion=11.0)" 
\
+               && msbuild.exe cppunit_dll.vcxproj 
/p:Configuration=$${PROFILEFLAGS}  \
                && cd ../DllPlugInTester \
-               && msbuild.exe DllPlugInTester.vcxproj /p:Configuration=$(if 
$(MSVC_USE_DEBUG_RUNTIME),Debug,Release) \
-               $(if $(filter 110,$(VCVER)),/p:PlatformToolset=v110_xp 
/p:VisualStudioVersion=11.0) \
+               && msbuild.exe DllPlugInTester.vcxproj 
/p:Configuration=$${PROFILEFLAGS} \
        ,src/cppunit)
 else
 
diff --git a/external/cppunit/UnpackedTarball_cppunit.mk 
b/external/cppunit/UnpackedTarball_cppunit.mk
index a46e9bf..fbae41b 100644
--- a/external/cppunit/UnpackedTarball_cppunit.mk
+++ b/external/cppunit/UnpackedTarball_cppunit.mk
@@ -17,6 +17,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
        external/cppunit/unix.patch \
        external/cppunit/wundef.patch \
        external/cppunit/CPPUNIT_PLUGIN_EXPORT.patch.0 \
+       external/cppunit/enable-win32-debug.patch \
 ))
 ifeq ($(DISABLE_DYNLOADING),TRUE)
 $(eval $(call gb_UnpackedTarball_add_patches,cppunit,\
diff --git a/external/cppunit/enable-win32-debug.patch 
b/external/cppunit/enable-win32-debug.patch
new file mode 100644
index 0000000..661bb4b
--- /dev/null
+++ b/external/cppunit/enable-win32-debug.patch
@@ -0,0 +1,18 @@
+--- misc/cppunit-1.13.1/src/cppunit/cppunit_dll.vcxproj
++++ misc/build/cppunit-1.13.1/src/cppunit/cppunit_dll.vcxproj
+@@ -107,7 +107,6 @@
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <WarningLevel>Level3</WarningLevel>
+       <RuntimeTypeInfo>true</RuntimeTypeInfo>
+-      <DebugInformationFormat>OldStyle</DebugInformationFormat>
+       
<AdditionalIncludeDirectories>..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+       
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPUNIT_BUILD_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+       <AssemblerListingLocation>.\ReleaseDll\</AssemblerListingLocation>
+@@ -138,6 +137,7 @@
+     <Link>
+       <SuppressStartupBanner>true</SuppressStartupBanner>
+       <LinkDLL>true</LinkDLL>
++      <GenerateDebugInformation>true</GenerateDebugInformation>
+       <SubSystem>Console</SubSystem>
+       <OutputFile>.\ReleaseDll\cppunit_dll.dll</OutputFile>
+       <ImportLibrary>.\ReleaseDll\cppunit_dll.lib</ImportLibrary>
diff --git a/sal/cppunittester/cppunittester.cxx 
b/sal/cppunittester/cppunittester.cxx
index 7ac8ab5..b42bf3a 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -214,6 +214,7 @@ public:
                 std::cerr << "please check your PATH variable and 
re-autogen.\n";
             }
 #endif
+            std::cerr << "Path is '" << getenv("PATH") << "'\n";
             return false;
         }
 #endif
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to