Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mingw] Please use standard printf/scanf
authorGabriel Corona <gabriel.corona@loria.fr>
Thu, 10 Sep 2015 08:15:57 +0000 (10:15 +0200)
committerGabriel Corona <gabriel.corona@loria.fr>
Thu, 10 Sep 2015 08:16:01 +0000 (10:16 +0200)
Ohterwise the compiler complains about %lli (and will faile at runtime
on XP). See the MinGW FAQ:

  http://sourceforge.net/p/mingw-w64/wiki2/printf%20and%20scanf%20family/

tools/cmake/Flags.cmake

index 872fe65..e0033bc 100644 (file)
@@ -149,3 +149,7 @@ if(NOT $ENV{LDFLAGS} STREQUAL "")
   message(STATUS "Add LDFLAGS: \"$ENV{LDFLAGS}\" to CMAKE_C_LINK_FLAGS")
   set(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} $ENV{LDFLAGS}")
 endif()
+
+if(MINGW)
+  add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
+endif()