Google OR-Tools: ortools/port/os.h Source File

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15#ifndef ORTOOLS_PORT_OS_H_

16#define ORTOOLS_PORT_OS_H_

17

18#if defined(__ANDROID__)

19#define ORTOOLS_TARGET_OS_IS_ANDROID

20#endif

21

22#if (defined(__apple__) || defined(__APPLE__) || defined(__MACH__))

23

24#include "TargetConditionals.h"

25#if TARGET_OS_IPHONE == 1

26#define ORTOOLS_TARGET_OS_IS_IOS

27#endif

28#endif

29

30#if defined(__EMSCRIPTEN__)

31#define ORTOOLS_TARGET_OS_IS_EMSCRIPTEN

32#endif

33

34#if defined(ORTOOLS_TARGET_OS_IS_ANDROID) || \

35 defined(ORTOOLS_TARGET_OS_IS_IOS) || \

36 defined(ORTOOLS_TARGET_OS_IS_EMSCRIPTEN)

37#define ORTOOLS_TARGET_OS_SUPPORTS_THREADS 0

38#else

39#define ORTOOLS_TARGET_OS_SUPPORTS_THREADS 1

40#endif

41

42#endif