mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
CMake: add workaround for Visual Studio 2015 linking issue
I tried to workaround it in code, but completely failed that. So for now we'll just tell linker to ignore multiple definitions.
This commit is contained in:
parent
02b5a5e830
commit
8577bba417
@ -148,6 +148,12 @@ if(WIN32)
|
||||
if(ENABLE_MULTI_PROCESS_BUILDS)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
|
||||
endif()
|
||||
|
||||
# Workaround: Visual Studio 2015 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()
|
||||
endif(MSVC)
|
||||
|
||||
if(MINGW)
|
||||
|
Loading…
Reference in New Issue
Block a user