From e3dfdd2305abb337638468aaca3d9b20718b5026 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Thu, 27 Oct 2011 13:08:36 +0200 Subject: [PATCH] Sync changes with RTK --- cmake/gengetopt/CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cmake/gengetopt/CMakeLists.txt b/cmake/gengetopt/CMakeLists.txt index 84443f0..2f586f9 100644 --- a/cmake/gengetopt/CMakeLists.txt +++ b/cmake/gengetopt/CMakeLists.txt @@ -5,12 +5,18 @@ ADD_DEFINITIONS(-DVERSION=\"2.22.4\") 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 -- 2.47.1