Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
d08f72eb
Unverified
Commit
d08f72eb
authored
May 10, 2020
by
Edward Thomson
Committed by
GitHub
May 10, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5500 from phkelley/enable-control-flow-guard
MSVC: Enable Control Flow Guard (CFG)
parents
898caead
63f9fbee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
CMakeLists.txt
+10
-0
No files found.
CMakeLists.txt
View file @
d08f72eb
...
...
@@ -137,6 +137,11 @@ IF (MSVC)
# /Gd - explicitly set cdecl calling convention
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
/Gd"
)
IF
(
NOT
(
MSVC_VERSION LESS 1900
))
# /guard:cf - Enable Control Flow Guard
SET
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
/guard:cf"
)
ENDIF
()
IF
(
STATIC_CRT
)
SET
(
CRT_FLAG_DEBUG
"/MTd"
)
SET
(
CRT_FLAG_RELEASE
"/MT"
)
...
...
@@ -183,6 +188,11 @@ IF (MSVC)
# /VERSION - Embed version information in PE header
SET
(
CMAKE_EXE_LINKER_FLAGS
"/DYNAMICBASE /NXCOMPAT /LARGEADDRESSAWARE /VERSION:
${
LIBGIT2_VERSION_MAJOR
}
.
${
LIBGIT2_VERSION_MINOR
}
"
)
IF
(
NOT
(
MSVC_VERSION LESS 1900
))
# /GUARD:CF - Enable Control Flow Guard
SET
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
/GUARD:CF"
)
ENDIF
()
# /DEBUG - Create a PDB
# /LTCG - Link time code generation (whole program optimization)
# /OPT:REF /OPT:ICF - Fold out duplicate code at link step
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment