File: CheckIncludeFilesCXX.cmake

package info (click to toggle)
kwave 25.04.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 23,272 kB
  • sloc: cpp: 56,173; xml: 817; perl: 688; sh: 57; makefile: 11
file content (40 lines) | stat: -rw-r--r-- 2,323 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#############################################################################
##    Kwave                - cmake/CheckIncludeFilesCXX.cmake
##                           -------------------
##    begin                : Tue Oct 13 2015
##    copyright            : (C) 2015 by Thomas Eschenbacher
##    email                : Thomas.Eschenbacher@gmx.de
#############################################################################
#
#############################################################################
#                                                                           #
# Redistribution and use in source and binary forms, with or without        #
# modification, are permitted provided that the following conditions        #
# are met:                                                                  #
#                                                                           #
# 1. Redistributions of source code must retain the above copyright         #
#    notice, this list of conditions and the following disclaimer.          #
# 2. Redistributions in binary form must reproduce the above copyright      #
#    notice, this list of conditions and the following disclaimer in the    #
#    documentation and/or other materials provided with the distribution.   #
#                                                                           #
# For details see the accompanying cmake/COPYING-CMAKE-SCRIPTS file.        #
#                                                                           #
#############################################################################

INCLUDE(CheckIncludeFileCXX)

# like CHECK_INCLUDE_FILES, but for C++ header and aborts with a fatal error
# if one of them was not found
# usage: CHECK_INCLUDE_FILES_CXX(header1 [header2] ...)
MACRO(CHECK_INCLUDE_FILES_CXX INCLUDES)
    FOREACH(_include ${INCLUDES})
        CHECK_INCLUDE_FILE_CXX(${_include} HAVE_${_include})
        IF (NOT HAVE_${_include})
            MESSAGE(FATAL_ERROR "unable to find the following C++ header file: ${_include}")
        ENDIF (NOT HAVE_${_include})
    ENDFOREACH(_include ${INCLUDES})
ENDMACRO(CHECK_INCLUDE_FILES_CXX)

#############################################################################
#############################################################################