From: Thomas Geymayer Date: Sat, 27 Apr 2013 21:44:32 +0000 (+0200) Subject: Work around MSVC linker bug with classes derived from i/ofstream X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fa64f7b6aa8502cd92cdfb3dddfaf2a548eabc64;p=simgear.git Work around MSVC linker bug with classes derived from i/ofstream --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a0d6278..854db0c9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -317,6 +317,9 @@ if(WIN32) # endforeach(warning) set(MSVC_FLAGS "-DWIN32 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS /wd4996 /wd4250 -Dstrdup=_strdup") + if (${MSVC_VERSION} GREATER 1599) + set( MSVC_LD_FLAGS "/FORCE:MULTIPLE" ) + endif (${MSVC_VERSION} GREATER 1599) endif(MSVC) # assumed on Windows @@ -328,6 +331,7 @@ endif(WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS_C} ${MSVC_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS_CXX} ${MSVC_FLAGS} ${BOOST_CXX_FLAGS}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}") include_directories(${PROJECT_SOURCE_DIR}) include_directories(${PROJECT_SOURCE_DIR}/simgear/canvas/ShivaVG/include)