Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MSK-SW
Low-Level Radio Frequency
Master Oscillator
XFEL
GPSDO
Commits
d12a894a
Commit
d12a894a
authored
Dec 03, 2020
by
Martin Christoph Hierholzer
Browse files
add macro to find gcc's atomic library
parent
f185f183
Changes
1
Hide whitespace changes
Inline
Side-by-side
cmake/Modules/FindGccAtomic.cmake
0 → 100644
View file @
d12a894a
# This scripts finds gcc's built-in atomic shared library (libatomic.so).
# It is required to link against this library on gcc when using 16 byte atomics, even when running on x86_64/amd64.
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
FIND_LIBRARY
(
GCCLIBATOMIC_LIBRARY NAMES atomic atomic.so.1 libatomic.so.1
HINTS
$ENV{HOME}/local/lib64
$ENV{HOME}/local/lib
/usr/local/lib64
/usr/local/lib
/opt/local/lib64
/opt/local/lib
/usr/lib64
/usr/lib
/lib64
/lib
)
else
()
SET
(
GCCLIBATOMIC_LIBRARY
""
)
endif
()
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
GCCLIBATOMIC DEFAULT_MSG GCCLIBATOMIC_LIBRARY
)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment