summaryrefslogblamecommitdiffstats
path: root/cmake/FindStdatomic.cmake
blob: d7ee9b81b5f9b8d1a258cab5abcb79b0060e8f12 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                                                              
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (C) 2021 Manuel Bentele <development@manuel-bentele.de>
#

find_file(Stdatomic_INCLUDE_FILE
          NAMES stdatomic.h
          HINTS ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES})

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Stdatomic
                                  FOUND_VAR Stdatomic_FOUND
                                  REQUIRED_VARS Stdatomic_INCLUDE_FILE
                                  FAIL_MESSAGE "Compiler does not support atomic operations!")