]> Creatis software - clitk.git/commitdiff
Sync changes with RTK
authorSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 27 Oct 2011 11:08:36 +0000 (13:08 +0200)
committerSimon Rit <simon.rit@creatis.insa-lyon.fr>
Thu, 27 Oct 2011 11:08:36 +0000 (13:08 +0200)
cmake/gengetopt/CMakeLists.txt

index 84443f01b5c32ee8be307e5f2acf6ab06d361d76..2f586f93acc526a5f4d86233b0e4813876ab214a 100644 (file)
@@ -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