mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-02 00:10:22 +02:00
CMake: extend linker workaround for all MSVC versions for now.
Debug builds in MSVS 2017 are also affected. 32-bit Release builds in MSVS 2015 are probably affected as well. Though in that case problem only appear for vcmitest, but not client.
This commit is contained in:
parent
8577bba417
commit
66e9db4bc3
@ -149,11 +149,11 @@ if(WIN32)
|
|||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Workaround: Visual Studio 2015 has issues with exports of classes that inherit templates
|
# Workaround: Visual Studio has issues with exports of classes that inherit templates
|
||||||
# https://stackoverflow.com/questions/44960760/msvc-dll-exporting-class-that-inherits-from-template-cause-lnk2005-already-defin
|
# https://stackoverflow.com/questions/44960760/msvc-dll-exporting-class-that-inherits-from-template-cause-lnk2005-already-defin
|
||||||
if(MSVC_VERSION LESS 1910)
|
# Reported to Microsoft here:
|
||||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
# https://developercommunity.visualstudio.com/content/problem/224597/linker-failing-because-of-multiple-definitions-of.html
|
||||||
endif()
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||||
endif(MSVC)
|
endif(MSVC)
|
||||||
|
|
||||||
if(MINGW)
|
if(MINGW)
|
||||||
|
Loading…
Reference in New Issue
Block a user