summaryrefslogtreecommitdiff
path: root/MSVC_NMake
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2020-01-13 17:04:43 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2020-04-29 16:52:01 +0800
commitcbfa6ad43173c39a1d38bb4a985d7a4dac116432 (patch)
tree1ba7b2c546cb108541cdb7cb4c888a90111deb7b /MSVC_NMake
parent81579598a3d050f494689e11ac22a8b89c7d685f (diff)
NMake: Fix building tests
This will make the tests build and link with Visual Studio + Boost DLL builds... However, some more work is required to make the tests recognized by the Boost test framework, which will be in the next commit.
Diffstat (limited to 'MSVC_NMake')
-rw-r--r--MSVC_NMake/build-rules-msvc.mak2
-rw-r--r--MSVC_NMake/config-msvc.mak5
2 files changed, 6 insertions, 1 deletions
diff --git a/MSVC_NMake/build-rules-msvc.mak b/MSVC_NMake/build-rules-msvc.mak
index 03e6ffe..ba86def 100644
--- a/MSVC_NMake/build-rules-msvc.mak
+++ b/MSVC_NMake/build-rules-msvc.mak
@@ -66,7 +66,7 @@ $(cairomm_OBJS)
{..\tests\}.cc{vs$(VSVER)\$(CFG)\$(PLAT)\}.exe:
@if not exist $(CAIROMM_LIB) $(MAKE) -f Makefile.vc CFG=$(CFG) $(CAIROMM_LIB)
@if not exist vs$(VSVER)\$(CFG)\$(PLAT)\cairomm-tests md vs$(VSVER)\$(CFG)\$(PLAT)\cairomm-tests
- $(CXX) $(CAIROMM_EX_CFLAGS) $(CFLAGS) /Fo$(@D)\cairomm-tests\ /Fd$(@D)\cairomm-tests\ $< /Fe$@ /link $(LDFLAGS) $(CAIROMM_LIB) $(LIBSIGC_LIB) $(CAIRO_LIB)
+ $(CXX) $(CAIROMM_TEST_CFLAGS) $(CFLAGS) /Fo$(@D)\cairomm-tests\ /Fd$(@D)\cairomm-tests\ $< /Fe$@ /link $(LDFLAGS) $(CAIROMM_LIB) $(LIBSIGC_LIB) $(CAIRO_LIB)
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
clean:
diff --git a/MSVC_NMake/config-msvc.mak b/MSVC_NMake/config-msvc.mak
index 5c4296f..1b326b3 100644
--- a/MSVC_NMake/config-msvc.mak
+++ b/MSVC_NMake/config-msvc.mak
@@ -35,6 +35,11 @@ CAIROMM_EXTRA_INCLUDES = \
LIBCAIROMM_CFLAGS = /DCAIROMM_BUILD $(CAIROMM_BASE_CFLAGS) $(CAIROMM_EXTRA_INCLUDES)
CAIROMM_EX_CFLAGS = $(CAIROMM_BASE_CFLAGS) $(CAIROMM_EXTRA_INCLUDES)
+CAIROMM_TEST_CFLAGS = \
+ $(CAIROMM_EX_CFLAGS) \
+ /DBOOST_TEST_MODULE=$(<B:test-=) \
+ /DPNG_STREAM_FILE=\"$(MAKEDIR:\=/)/../tests/png-stream-test.png\" \
+ /std:c++latest
CAIROMM_INT_SOURCES = $(cairomm_cc:/=\)
CAIROMM_INT_HDRS = $(cairomm_public_h:/=\)