From aa2662427da4a4b81ea2e67561a223b9c4c3b4d0 Mon Sep 17 00:00:00 2001 From: navarrop Date: Tue, 1 Jun 2010 13:24:08 +0000 Subject: [PATCH 1/1] Solve variable init value for windows. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7817 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- CMakeLists.txt | 2 ++ buildtools/Cmake/gras_config.h.in | 4 ++++ include/xbt/log.h | 1 + 3 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c4f7f48a88..e40adb6f0f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/buildtools/Cmake/gras_config.h.in b/buildtools/Cmake/gras_config.h.in index c0755edb5c..fccb7011d1 100644 --- a/buildtools/Cmake/gras_config.h.in +++ b/buildtools/Cmake/gras_config.h.in @@ -1,6 +1,10 @@ // /buildtools/Cmake/gras_config.h.in is user-written. // With Cmake it creates /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@ diff --git a/include/xbt/log.h b/include/xbt/log.h index 1502558dd7..77f036b609 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -34,6 +34,7 @@ #define _XBT_LOG_H_ #include "xbt/misc.h" +#include "gras_config.h" #include SG_BEGIN_DECL() -- 2.20.1