ua_config.h.in 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /* This Source Code Form is subject to the terms of the Mozilla Public
  2. * License, v. 2.0. If a copy of the MPL was not distributed with this
  3. * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
  4. #ifndef UA_CONFIG_H_
  5. #define UA_CONFIG_H_
  6. /**
  7. * open62541 Version
  8. * ----------------- */
  9. #define UA_OPEN62541_VER_MAJOR ${OPEN62541_VER_MAJOR}
  10. #define UA_OPEN62541_VER_MINOR ${OPEN62541_VER_MINOR}
  11. #define UA_OPEN62541_VER_PATCH ${OPEN62541_VER_PATCH}
  12. #define UA_OPEN62541_VER_LABEL "${OPEN62541_VER_LABEL}" /* Release candidate label, etc. */
  13. #define UA_OPEN62541_VER_COMMIT "${OPEN62541_VER_COMMIT}"
  14. /**
  15. * Feature Options
  16. * ---------------
  17. * Changing the feature options has no effect on a pre-compiled library. */
  18. #define UA_LOGLEVEL ${UA_LOGLEVEL}
  19. #cmakedefine UA_ENABLE_METHODCALLS
  20. #cmakedefine UA_ENABLE_NODEMANAGEMENT
  21. #cmakedefine UA_ENABLE_SUBSCRIPTIONS
  22. #cmakedefine UA_ENABLE_PUBSUB
  23. #cmakedefine UA_ENABLE_PUBSUB_ETH_UADP
  24. #cmakedefine UA_ENABLE_PUBSUB_DELTAFRAMES
  25. #cmakedefine UA_ENABLE_PUBSUB_INFORMATIONMODEL
  26. #cmakedefine UA_ENABLE_ENCRYPTION
  27. #cmakedefine UA_ENABLE_HISTORIZING
  28. #cmakedefine UA_ENABLE_SUBSCRIPTIONS_EVENTS
  29. /* Multithreading */
  30. #cmakedefine UA_ENABLE_MULTITHREADING
  31. #cmakedefine UA_ENABLE_IMMUTABLE_NODES
  32. #if defined(UA_ENABLE_MULTITHREADING) && !defined(UA_ENABLE_IMMUTABLE_NODES)
  33. #error "The multithreading feature requires nodes to be immutable"
  34. #endif
  35. /* Advanced Options */
  36. #cmakedefine UA_ENABLE_STATUSCODE_DESCRIPTIONS
  37. #cmakedefine UA_ENABLE_TYPENAMES
  38. #cmakedefine UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
  39. #cmakedefine UA_ENABLE_DETERMINISTIC_RNG
  40. #cmakedefine UA_ENABLE_NONSTANDARD_UDP
  41. #cmakedefine UA_ENABLE_DISCOVERY
  42. #cmakedefine UA_ENABLE_DISCOVERY_MULTICAST
  43. #cmakedefine UA_ENABLE_QUERY
  44. #cmakedefine UA_ENABLE_DISCOVERY_SEMAPHORE
  45. #cmakedefine UA_ENABLE_UNIT_TEST_FAILURE_HOOKS
  46. #cmakedefine UA_ENABLE_VALGRIND_INTERACTIVE
  47. #define UA_VALGRIND_INTERACTIVE_INTERVAL ${UA_VALGRIND_INTERACTIVE_INTERVAL}
  48. #cmakedefine UA_GENERATED_NAMESPACE_ZERO
  49. /* Options for Debugging */
  50. #cmakedefine UA_DEBUG
  51. #cmakedefine UA_DEBUG_DUMP_PKGS
  52. /**
  53. * Function Export
  54. * ---------------
  55. * On Win32: Define ``UA_DYNAMIC_LINKING`` and ``UA_DYNAMIC_LINKING_EXPORT`` in
  56. * order to export symbols for a DLL. Define ``UA_DYNAMIC_LINKING`` only to
  57. * import symbols from a DLL.*/
  58. #cmakedefine UA_DYNAMIC_LINKING
  59. /* Shortcuts for extern "C" declarations */
  60. #if !defined(_UA_BEGIN_DECLS)
  61. # ifdef __cplusplus
  62. # define _UA_BEGIN_DECLS extern "C" {
  63. # else
  64. # define _UA_BEGIN_DECLS
  65. # endif
  66. #endif
  67. #if !defined(_UA_END_DECLS)
  68. # ifdef __cplusplus
  69. # define _UA_END_DECLS }
  70. # else
  71. # define _UA_END_DECLS
  72. # endif
  73. #endif
  74. /* Select default architecture if non is selected through CMake or compiler define */
  75. #if ${UA_ARCHITECTURES_NODEF}
  76. # ifdef _WIN32
  77. # define UA_ARCHITECTURE_WIN32
  78. # else
  79. # define UA_ARCHITECTURE_POSIX
  80. # endif
  81. #endif
  82. #include "ua_architecture.h"
  83. #endif /* UA_CONFIG_H_ */