mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
* remove static linking for libgcc
* fix clang warnings
This commit is contained in:
parent
13cbf0bbca
commit
83aff2d68e
@ -70,18 +70,12 @@ if (WIN32)
|
||||
set(CMAKE_SHARED_LIBRARY_PREFIX "")
|
||||
|
||||
if(MINGW)
|
||||
get_filename_component(MINGW_PATH ${CMAKE_CXX_COMPILER} PATH )
|
||||
|
||||
#link to libgcc_s_*.dll statically
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
|
||||
#copy libwinpthread-*.dll to VCMI location
|
||||
set(dep_files ${dep_files} "${MINGW_PATH}/libwinpthread-*.dll")
|
||||
|
||||
#copy libgcc_s_*.dll and libstdc++-*.dll to VCMI location, because vanilla Qt5 build with dynamic linking
|
||||
set(dep_files ${dep_files} "${MINGW_PATH}/libgcc_s_*.dll")
|
||||
set(dep_files ${dep_files} "${MINGW_PATH}/libstdc++-*.dll")
|
||||
get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH )
|
||||
|
||||
#copy libwinpthread-*.dll, libgcc_s_*.dll and libstdc++-*.dll to VCMI location
|
||||
set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libwinpthread-*.dll")
|
||||
set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libgcc_s_*.dll")
|
||||
set(dep_files ${dep_files} "${MINGW_BIN_PATH}/libstdc++-*.dll")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -144,7 +138,7 @@ endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR NOT WIN32) #so far all *nix compilers support such parameters
|
||||
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
set(CLANG_SPECIFIC_FLAGS "-Wno-mismatched-tags")
|
||||
set(CLANG_SPECIFIC_FLAGS "-Wno-mismatched-tags -Wno-unknown-warning-option")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x -Wall -Wextra -Wpointer-arith -Wno-strict-aliasing -Wno-switch -Wno-sign-compare -Wno-unused-local-typedefs -Wno-unused-parameter -Wuninitialized -Wno-overloaded-virtual -Wno-type-limits ${CLANG_SPECIFIC_FLAGS}")
|
||||
|
Loading…
Reference in New Issue
Block a user