summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2011-10-24 03:41:03 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2011-10-24 03:41:03 (GMT)
commit82ff5a12ec876c80a626357557fa8afdbf0721cc (patch)
tree97fcce1759b6813ec369d528862390795f74e196 /tests
parentcbde518369b906febe816b199fd8e9d4d75231c0 (diff)
fdef getopt.h for MSVC, cleanup makefile, ignore another msvc warning
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt2
-rw-r--r--tests/echotest.cc2
2 files changed, 4 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 22d4f96..bc0d071 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -42,6 +42,8 @@ if(WIN32)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4100")
# fopen_s advertisement
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_DEPRECATE")
+ # lexer uses strdup & other POSIX stuff
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_NONSTDC_NO_DEPRECATE")
# M_PI
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_USE_MATH_DEFINES")
endif()
diff --git a/tests/echotest.cc b/tests/echotest.cc
index c53e47f..5b216f4 100644
--- a/tests/echotest.cc
+++ b/tests/echotest.cc
@@ -37,7 +37,9 @@
#include <QFile>
#include <QDir>
#include <QSet>
+#ifndef _MSC_VER
#include <getopt.h>
+#endif
#include <assert.h>
#include <iostream>
#include <sstream>
contact: Jan Huwald // Impressum