aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/unit/makefile6
-rw-r--r--test/unit/test.mak4
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