# HG changeset patch
# User Alpar Juttner <alpar@cs.elte.hu>
# Date 1302188255 -7200
# Node ID 64260c0f58eb25c9bf6563793f7bacbfcc0a14bb
# Parent 16d466589b54343660684094593caaa09188c928
Better Win CodeBlock/MinGW support (#418)
- Remove -ansi compilation flag
- Don't include sys/times.h when WIN32 is defined
diff --git a/CMakeLists.txt b/CMakeLists.txt
a
|
b
|
|
51 | 51 | SET(CXX_WARNING $ENV{LEMON_CXX_WARNING}) |
52 | 52 | ELSE() |
53 | 53 | IF(CMAKE_COMPILER_IS_GNUCXX) |
54 | | SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas") |
| 54 | SET(CXX_WARNING "-Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas") |
55 | 55 | SET(CMAKE_CXX_FLAGS_DEBUG CACHE STRING "-ggdb") |
56 | 56 | SET(CMAKE_C_FLAGS_DEBUG CACHE STRING "-ggdb") |
57 | 57 | ELSEIF(MSVC) |
diff --git a/lemon/bits/windows.cc b/lemon/bits/windows.cc
a
|
b
|
|
40 | 40 | #else |
41 | 41 | #include <unistd.h> |
42 | 42 | #include <ctime> |
| 43 | #ifndef WIN32 |
43 | 44 | #include <sys/times.h> |
| 45 | #endif |
44 | 46 | #include <sys/time.h> |
45 | 47 | #endif |
46 | 48 | |