summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-06-22 22:43:55 -0700
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2017-06-22 22:51:41 -0700
commit0fff224d7287de8f52927179423fc499fcf2fbc1 (patch)
tree2b849559706e4b30f5070862db8e9c8782b28e42 /Makefile
parent20a8eced3b86c03d9dce7823feb3536a75c78b3e (diff)
tests: Add -fshort-wchar tests
These tests are very tricky - in general -fshort-wchar is a dangerous option because, since the standard library is not compiled with it, you can't use any functions from either C or C++ standard library without getting ABI mismatch. The reason we want to use this is to do coverage testing on UTF32->UTF16 and UTF16->UTF32 conversion paths, that generally aren't hit on gcc/clang. To do this, we carefully work around any internal calls to wcslen/wcscmp that pugixml might be doing and don't use any wstring functions.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index edc3c42..4b340a3 100644
--- a/Makefile
+++ b/Makefile
@@ -99,6 +99,10 @@ $(BUILD)/%.o: %
@mkdir -p $(dir $@)
$(CXX) $< $(CXXFLAGS) -c -MMD -MP -o $@
+$(BUILD)/tests/test_short_wchar.cpp.o: tests/test_short_wchar.cpp
+ @mkdir -p $(dir $@)
+ $(CXX) $< $(CXXFLAGS) -fshort-wchar -c -MMD -MP -o $@
+
-include $(OBJECTS:.o=.d)
.SECONDEXPANSION: