File: FindHeaders.cmake

package info (click to toggle)
osslsigncode 2.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,148 kB
  • sloc: ansic: 11,997; python: 939; sh: 74; makefile: 12
file content (26 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (2)
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
include(CheckIncludeFile)
include(CheckFunctionExists)

if(UNIX)
    check_function_exists(getpass HAVE_GETPASS)
    check_include_file(termios.h HAVE_TERMIOS_H)
    check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
    if(HAVE_SYS_MMAN_H)
        check_function_exists(mmap HAVE_MMAP)
    endif(HAVE_SYS_MMAN_H)
else(UNIX)
    check_include_file(windows.h HAVE_MAPVIEWOFFILE)
endif(UNIX)

if(NOT (HAVE_MMAP OR HAVE_MAPVIEWOFFILE))
    message(FATAL_ERROR "Error: Need file mapping function to build.")
endif(NOT (HAVE_MMAP OR HAVE_MAPVIEWOFFILE))

#[[
Local Variables:
    c-basic-offset: 4
    tab-width: 4
    indent-tabs-mode: nil
End:
    vim: set ts=4 expandtab:
]]