From 9aa05526ca323258c4879520093a0fe27826d53c Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 20 Jul 2021 11:27:31 +1000 Subject: Add OPTIMIZATION variable so caller can choose optimization level. Drop lexlib from include path as no longer part of Scintilla. For clang on Windows, turn off deprecated function warning and disable sanitizers as they are slow. --- test/unit/makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test/unit/makefile') diff --git a/test/unit/makefile b/test/unit/makefile index 1cde6319e..fad312708 100644 --- a/test/unit/makefile +++ b/test/unit/makefile @@ -15,19 +15,23 @@ USELIBCPP = 1 endif endif +CXXFLAGS += $(OPTIMIZATION) CXXFLAGS += --std=$(CXXSTD) ifdef CLANG CXX = clang++ +CXXFLAGS += -D_CRT_SECURE_NO_DEPRECATE ifdef USELIBCPP # OS X, use libc++ but don't have sanitizers CXXFLAGS += --stdlib=libc++ LINKFLAGS = -lc++ else +ifndef windir # Linux, have sanitizers SANITIZE = -fsanitize=address,undefined CXXFLAGS += $(SANITIZE) endif +endif else CXX = g++ endif @@ -40,7 +44,7 @@ DEL = rm -f EXE = unitTest endif -INCLUDEDIRS = -I ../../include -I ../../src -I../../lexlib +INCLUDEDIRS = -I ../../include -I ../../src CPPFLAGS += $(INCLUDEDIRS) CXXFLAGS += -Wall -Wextra -- cgit v1.2.3