From: Simon Rit Date: Thu, 27 Oct 2011 11:08:36 +0000 (+0200) Subject: Sync changes with RTK X-Git-Tag: v1.3.0~176 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e3dfdd2305abb337638468aaca3d9b20718b5026;p=clitk.git Sync changes with RTK --- 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