Link with -latomic

This commit is contained in:
Desour 2023-04-22 18:42:08 +02:00 committed by sfan5
parent 46c930cf70
commit b6c7c5a7ab

@ -314,6 +314,13 @@ else()
endif() endif()
endif() endif()
# On clang and gcc, some functionalities of std::atomic require -latomic.
# See <https://en.cppreference.com/w/cpp/atomic/atomic#Notes>.
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(PLATFORM_LIBS ${PLATFORM_LIBS} atomic)
endif()
check_include_files(endian.h HAVE_ENDIAN_H) check_include_files(endian.h HAVE_ENDIAN_H)
configure_file( configure_file(