ADD_DEFINITIONS(-DHAVE_SSTREAM)
ADD_DEFINITIONS(-DHAVE_NAMESPACES)
-IF(WIN32)
+# Remove compiler warnings
+STRING(REPLACE "/W3" "/w" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+STRING(REPLACE "/W3" "/w" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+STRING(REPLACE "-Wall" "-w" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+STRING(REPLACE "-Wall" "-w" CMAKE_C_FLAGS ${CMAKE_C_FLAGS})
+
+# MSVC specific issues
+IF(MSVC)
ADD_DEFINITIONS(-DHAVE_STRING_H)
ADD_DEFINITIONS(-DYY_NO_UNISTD_H)
ADD_DEFINITIONS(-Disatty=!)
- INCLUDE_DIRECTORIES(include_cygwin)
-ENDIF(WIN32)
+ENDIF(MSVC)
ADD_EXECUTABLE(gengetopt
./cmdline.c