diff options
author | Neil <nyamatongwe@gmail.com> | 2021-07-20 11:27:31 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-07-20 11:27:31 +1000 |
commit | 9aa05526ca323258c4879520093a0fe27826d53c (patch) | |
tree | ffb34af1ffd46fa630104d35158d3a39ee6b5e47 | |
parent | d8db0d5be682953b72a79017fe4888b39c9e2125 (diff) | |
download | scintilla-mirror-9aa05526ca323258c4879520093a0fe27826d53c.tar.gz |
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.
-rw-r--r-- | test/unit/makefile | 6 | ||||
-rw-r--r-- | test/unit/test.mak | 4 |
2 files changed, 7 insertions, 3 deletions
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 diff --git a/test/unit/test.mak b/test/unit/test.mak index 116c6c0d5..9e1c9acf4 100644 --- a/test/unit/test.mak +++ b/test/unit/test.mak @@ -4,9 +4,9 @@ DEL = del /q EXE = unitTest.exe -INCLUDEDIRS = /I../../include /I../../src /I../../lexlib +INCLUDEDIRS = /I../../include /I../../src -CXXFLAGS = /EHsc /std:c++17 /D_HAS_AUTO_PTR_ETC=1 /wd 4805 $(INCLUDEDIRS) +CXXFLAGS = /EHsc /std:c++17 $(OPTIMIZATION) /nologo /D_HAS_AUTO_PTR_ETC=1 /wd 4805 $(INCLUDEDIRS) # Files in this directory containing tests TESTSRC=test*.cxx |