From 16650cf3a83f23bc7f3e277a6a7dc1473c5d1c14 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Fri, 26 Feb 2016 09:12:52 +0100 Subject: [PATCH] further cleanups of the DLL usage madness --- include/simgrid_config.h.in | 17 ----------------- tools/cmake/MakeLibWin.cmake | 4 ++-- tools/cmake/src/internal_config.h.in | 12 ------------ 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in index abc09ae935..6628613222 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid_config.h.in @@ -30,26 +30,9 @@ SIMGRID_VERSION_MINOR, \ SIMGRID_VERSION_PATCH) -/* take care of DLL usage madness */ -#ifdef _XBT_DLL_EXPORT - #ifndef DLL_EXPORT - #define DLL_EXPORT - #endif -#else - #ifndef DLL_EXPORT - #define DLL_IMPORT - #endif -#endif - #cmakedefine _XBT_WIN32 @_XBT_WIN32@ /*this variable is set if it is a windows platform*/ #cmakedefine _WIN32 @_WIN32@ /*this variable is set if it is a 32 bits windows platform*/ #cmakedefine _WIN64 @_WIN64@ /*this variable is set if it is a 64 bits windows platform*/ -#cmakedefine __VISUALC__ @__VISUALC__@ -#ifdef _XBT_WIN32 - #ifndef __GNUC__ - #cmakedefine __GNUC__ @__GNUC__@ - #endif -#endif /* Define to 1 if you have the header file. */ #cmakedefine HAVE_UNISTD_H @HAVE_UNISTD_H@ diff --git a/tools/cmake/MakeLibWin.cmake b/tools/cmake/MakeLibWin.cmake index 2a2a69aa77..67bc91e97f 100644 --- a/tools/cmake/MakeLibWin.cmake +++ b/tools/cmake/MakeLibWin.cmake @@ -4,11 +4,11 @@ add_library(simgrid SHARED ${simgrid_sources}) if(MSVC) set_target_properties(simgrid PROPERTIES - COMPILE_FLAGS "/D_XBT_DLL_EXPORT /DDLL_EXPORT" + COMPILE_FLAGS "/DDLL_EXPORT" VERSION ${libsimgrid_version} ) else() set_target_properties(simgrid PROPERTIES - COMPILE_FLAGS "-D_XBT_DLL_EXPORT -DDLL_EXPORT" + COMPILE_FLAGS "-DDLL_EXPORT" LINK_FLAGS "-shared" VERSION ${libsimgrid_version} PREFIX "lib" SUFFIX ".dll" diff --git a/tools/cmake/src/internal_config.h.in b/tools/cmake/src/internal_config.h.in index 7b0a7711c9..1f52559239 100644 --- a/tools/cmake/src/internal_config.h.in +++ b/tools/cmake/src/internal_config.h.in @@ -9,18 +9,6 @@ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ -/* Set somes variables for Windows compilation */ - -#ifdef _XBT_DLL_EXPORT - #ifndef DLL_EXPORT - #define DLL_EXPORT - #endif -#else - #ifndef DLL_IMPORT - #define DLL_IMPORT - #endif -#endif - /* If __thread is available */ #cmakedefine HAVE_THREAD_LOCAL_STORAGE @HAVE_THREAD_LOCAL_STORAGE@ -- 2.20.1