diff --git a/CMakeLists.txt b/CMakeLists.txt index 52685cfbfe90..9685e2b12d0e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -66,7 +66,7 @@ elseif (MSVC) endif () if (MSVC_VERSION GREATER 1914) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /experimental:external /external:W2") - set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "/external:I ") + set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "/external:I ") endif () # exporting symbols for shared libraries needs to enabled explicitly set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) @@ -142,6 +142,7 @@ endif (APPLE) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND WIN32) option(USE_MINGW_64BITS "Use 64 bits libraries for the compilation with MinGW" true) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWIN32 -D_WIN32_WINNT=0x0501") + set(MINGW32 1) endif () # Check if libraries have to be found, depending on SUMO_LIBRARIES diff --git a/src/config.h.cmake b/src/config.h.cmake index ce10faafc9c3..6ca79a2ba868 100644 --- a/src/config.h.cmake +++ b/src/config.h.cmake @@ -1,4 +1,4 @@ -/* Check if we're using Microsoft Visual Studio */ +/* Macros for Microsoft Visual Studio */ #ifdef _MSC_VER /* Disable "decorated name length exceeded, name was truncated" warnings. */ @@ -29,11 +29,14 @@ #define FOX_CONSTRUCTOR(classname) __pragma(warning(suppress: 26495)) \ classname() {} -/* GNU Compiler */ +/* Macros for GNU Compiler */ #else + /* defined if we're using MINGW32 */ + #cmakedefine MINGW32 + /* Windows (MinGW32) */ - #ifdef __MINGW32__ + #ifdef MINGW32 /* Define WIN32 */ #ifndef WIN32 @@ -42,8 +45,8 @@ /* Define for dynamic Fox linkage */ #define FOXDLL 1 - - /* Define default constructor for FOX moduls (MinGW32) */ + + /* Define default constructor for FOX moduls (MinGW32) */ #define FOX_CONSTRUCTOR(classname) classname() {} /* Linux and OS */