Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Algorithms Library Toolkit Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Container registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Algorithms Library Toolkit
Algorithms Library Toolkit Core
Commits
901689de
Unverified
Commit
901689de
authored
4 years ago
by
Tomáš Pecka
Browse files
Options
Downloads
Patches
Plain Diff
CMake: remove sanitizers from cmake
parent
c8e50ada
No related branches found
No related tags found
2 merge requests
!144
Merge tp
,
!143
ci test do not merge
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMake/Modules/CompilerFlags.cmake
+0
-2
0 additions, 2 deletions
CMake/Modules/CompilerFlags.cmake
CMake/Modules/sanitizer.cmake
+0
-36
0 additions, 36 deletions
CMake/Modules/sanitizer.cmake
with
0 additions
and
38 deletions
CMake/Modules/CompilerFlags.cmake
+
0
−
2
View file @
901689de
...
@@ -3,10 +3,8 @@
...
@@ -3,10 +3,8 @@
# Flags according to Debug/Release decision
# Flags according to Debug/Release decision
# - CMake uses -g on Debug implicitly
# - CMake uses -g on Debug implicitly
# - fPIC for libraries will be enabled explicitly
# - fPIC for libraries will be enabled explicitly
# sanitizer
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
include
(
sanitizer
)
# sanitizer -DSANITIZE=<sanitizer>
find_package
(
Backtrace
)
find_package
(
Backtrace
)
message
(
"[Build type]:
${
BUILD_TYPE
}
(cmake:
${
CMAKE_BUILD_TYPE
}
)"
)
message
(
"[Build type]:
${
BUILD_TYPE
}
(cmake:
${
CMAKE_BUILD_TYPE
}
)"
)
...
...
This diff is collapsed.
Click to expand it.
CMake/Modules/sanitizer.cmake
deleted
100644 → 0
+
0
−
36
View file @
c8e50ada
# Adapted from: https://github.com/Eyescale/CMake/blob/master/Sanitizer.cmake
if
(
NOT SANITIZER
)
return
()
endif
()
# According to: http://clang.llvm.org/docs/AddressSanitizer.html#usage
# the following compiler flags allow us to keep -O1 on, if desired, but
# still get pretty call stacks
# set(_SANITIZER_COMPILE_OPTIONS "-g -fno-omit-frame-pointer -fno-optimize-sibling-calls")
string
(
TOLOWER
${
SANITIZER
}
SANITIZER
)
set
(
AVAILABLE_SANITIZERS
""
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.7
)
set
(
AVAILABLE_SANITIZERS address thread
)
endif
()
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.1
)
set
(
AVAILABLE_SANITIZERS address thread undefined
)
endif
()
endif
()
list
(
FIND AVAILABLE_SANITIZERS
${
SANITIZER
}
_SANITIZER_FOUND
)
if
(
${
_SANITIZER_FOUND
}
GREATER -1
)
set
(
_SANITIZER
"-fsanitize=
${
SANITIZER
}
"
)
add_compile_options
(
"-fno-omit-frame-pointer"
${
_SANITIZER
}
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
_SANITIZER
}
"
)
else
()
message
(
WARNING
"Sanitizer '
${
SANITIZER
}
' not set, check compiler support."
)
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