Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Solve variable init value for windows.
authornavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Jun 2010 13:24:08 +0000 (13:24 +0000)
committernavarrop <navarrop@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 1 Jun 2010 13:24:08 +0000 (13:24 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7817 48e7efb5-ca39-0410-a469-dd3cf9ba447f

CMakeLists.txt
buildtools/Cmake/gras_config.h.in
include/xbt/log.h

index c4f7f48..e40adb6 100644 (file)
@@ -19,6 +19,8 @@ if(WIN32)
     message("          -- CMAKE_BUILD_TOOL                     ${CMAKE_BUILD_TOOL}")
     message("          -- LINKER                               ${CMAKE_LINKER}")
     message("          -- CMAKE_GENERATOR                      ${CMAKE_GENERATOR}\n\n")
+    set(__STRICT_ANSI__ 1)
+    set(_MSC_VER 1)
 endif(WIN32)
 
 ### Find programs and paths
index c0755ed..fccb701 100644 (file)
@@ -1,6 +1,10 @@
 // <root>/buildtools/Cmake/gras_config.h.in is user-written.
 // With Cmake it creates <root>/src/gras_config.h
 
+/* Set somes variables for Windows compilation */
+#cmakedefine __STRICT_ANSI__ @__STRICT_ANSI__@
+#cmakedefine _MSC_VER @_MSC_VER@
+
 /* Set to true if enable_model-checking is true */
 #cmakedefine MMALLOC_WANT_OVERIDE_LEGACY @MMALLOC_WANT_OVERIDE_LEGACY@
 #cmakedefine HAVE_MC @HAVE_MC@
index 1502558..77f036b 100644 (file)
@@ -34,6 +34,7 @@
 #define _XBT_LOG_H_
 
 #include "xbt/misc.h"
+#include "gras_config.h"
 
 #include <stdarg.h>
 SG_BEGIN_DECL()