diff --git a/external/cppunit/ExternalProject_cppunit.mk b/external/cppunit/ExternalProject_cppunit.mk
index 9a163e7876f2..30a5905bcc00 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 a46e9bf6b3b2..fbae41b549a8 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 000000000000..661bb4b35f9c
--- /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 @@
+ true
+ Level3
+ true
+- OldStyle
+ ..\..\include;%(AdditionalIncludeDirectories)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;CPPUNIT_BUILD_DLL;%(PreprocessorDefinitions)
+ .\ReleaseDll\
+@@ -138,6 +137,7 @@
+
+ true
+ true
++ true
+ Console
+ .\ReleaseDll\cppunit_dll.dll
+ .\ReleaseDll\cppunit_dll.lib
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 7ac8ab5d676c..b42bf3a4d7ce 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