Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Opus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Traud
Opus
Commits
d4b8707b
Commit
d4b8707b
authored
4 years ago
by
Zeno Sebastian Endemann
Committed by
Ralph Giles
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
CMake: Make _FORTIFY_SOURCE optional
parent
8ad827c3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+7
-1
7 additions, 1 deletion
CMakeLists.txt
with
7 additions
and
1 deletion
CMakeLists.txt
+
7
−
1
View file @
d4b8707b
...
...
@@ -109,6 +109,12 @@ cmake_dependent_option(OPUS_STACK_PROTECTOR
OFF
)
add_feature_info
(
OPUS_STACK_PROTECTOR OPUS_STACK_PROTECTOR
${
OPUS_STACK_PROTECTOR_HELP_STR
}
)
if
(
NOT MSVC AND NOT MINGW
)
set
(
OPUS_FORTIFY_SOURCE_HELP_STR
"add protection against buffer overflows."
)
option
(
OPUS_FORTIFY_SOURCE
${
OPUS_FORTIFY_SOURCE_HELP_STR
}
ON
)
add_feature_info
(
OPUS_FORTIFY_SOURCE OPUS_FORTIFY_SOURCE
${
OPUS_FORTIFY_SOURCE_HELP_STR
}
)
endif
()
if
(
OPUS_CPU_X86 OR OPUS_CPU_X64
)
set
(
OPUS_X86_MAY_HAVE_SSE_HELP_STR
"does runtime check for SSE1 support."
)
cmake_dependent_option
(
OPUS_X86_MAY_HAVE_SSE
...
...
@@ -241,7 +247,7 @@ target_include_directories(
target_link_libraries
(
opus PRIVATE
${
OPUS_REQUIRED_LIBRARIES
}
)
target_compile_definitions
(
opus PRIVATE OPUS_BUILD ENABLE_HARDENING
)
if
(
NOT MSVC
)
if
(
OPUS_FORTIFY_SOURCE
)
target_compile_definitions
(
opus PRIVATE _FORTIFY_SOURCE=2
)
endif
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment