diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-21 00:41:50 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2019-01-25 22:47:39 +0000 |
commit | 7ed2baf7b18c0b98dc090216b55ce50a1311fd97 (patch) | |
tree | 90020b41e70194bc69fbf4368cd8782d92ea7753 /CMakeLists.txt | |
parent | 3fba5891ef96af7c25ab333759f8d518fd22d590 (diff) | |
download | libgit2-7ed2baf7b18c0b98dc090216b55ce50a1311fd97.tar.gz |
MSVC: ignore empty compilation units (warning LNK4221)
A number of source files have their implementation #ifdef'd out (because
they target another platform). MSVC warns on empty compilation units
(with warning LNK4221). Ignore warning 4221 when creating the object
library.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index eecc22d20..0e0f296a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -164,6 +164,9 @@ IF (MSVC) # /O1 - Optimize for size 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") + # /DYNAMICBASE - Address space load randomization (ASLR) # /NXCOMPAT - Data execution prevention (DEP) # /LARGEADDRESSAWARE - >2GB user address space on x86 |