mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +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")
|
||||
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
|
||||
if(MSVC_VERSION LESS 1910)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||
endif()
|
||||
# Reported to Microsoft here:
|
||||
# https://developercommunity.visualstudio.com/content/problem/224597/linker-failing-because-of-multiple-definitions-of.html
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /FORCE:MULTIPLE")
|
||||
endif(MSVC)
|
||||
|
||||
if(MINGW)
|
||||
|
Loading…
Reference in New Issue
Block a user