mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
Fix MSVC cross compilation
Currently, the DefaultCFlags.cmake overrides the CMAKE_STATIC_LINKER_FLAGS to suppress linker warnings about files with no symbols defined. This has the side effect of breaking MSVC cross compilation (where CMAKE_STATIC_LINKER_FLAGS is used to specify the /MACHINE:ARCH flag) This commit make sure we append to CMAKE_STATIC_LINKER_FLAGS instead of replacing its values
This commit is contained in:
committed by
Edward Thomson
parent
0922fcc46f
commit
94103d14da
@@ -56,7 +56,7 @@ if(MSVC)
|
||||
set(CMAKE_C_FLAGS_MINSIZEREL "/DNDEBUG /O1 /Oy /GL /Gy ${CRT_FLAG_RELEASE}")
|
||||
|
||||
# /IGNORE:4221 - Ignore empty compilation units
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "/IGNORE:4221")
|
||||
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /IGNORE:4221")
|
||||
|
||||
# /DYNAMICBASE - Address space load randomization (ASLR)
|
||||
# /NXCOMPAT - Data execution prevention (DEP)
|
||||
|
||||
Reference in New Issue
Block a user