forked from modelica/ModelicaStandardLibrary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compiler_options.cmake
35 lines (33 loc) · 1.03 KB
/
compiler_options.cmake
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
include(CheckSymbolExists)
check_symbol_exists(memcpy "string.h" HAVE_MEMCPY)
check_symbol_exists(fseeko "stdio.h" HAVE_FSEEKO)
check_symbol_exists(ftello "stdio.h" HAVE_FTELLO)
check_symbol_exists(fseeko64 "stdio.h" HAVE_FSEEKO64)
check_symbol_exists(ftello64 "stdio.h" HAVE_FTELLO64)
include(CheckIncludeFile)
check_include_file("dirent.h" HAVE_DIRENT_H)
check_include_file("io.h" HAVE_IO_H)
check_include_file("locale.h" HAVE_LOCALE_H)
check_include_file("pthread.h" HAVE_PTHREAD_H)
check_include_file("stdarg.h" HAVE_STDARG_H)
check_include_file("time.h" HAVE_TIME_H)
check_include_file("unistd.h" HAVE_UNISTD_H)
check_include_file("winapifamily.h" HAVE_WINAPIFAMILY_H)
include(CheckCSourceCompiles)
check_c_source_compiles(
"
#include <stdlib.h>
static void f(void) __attribute__ ((visibility(\"hidden\")));
int main(void) {return 0;}
"
HAVE_ATTRIBUTE_VISIBILITY_HIDDEN
)
if (HAVE_UNISTD_H)
check_c_source_compiles(
"
#include <unistd.h>
int main(void) {getpid(); return 0;}
"
HAVE_GETPID
)
endif()