ua_config.h.in 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_PUBSUB_INFORMATIONMODEL_METHODS
  27. #cmakedefine UA_ENABLE_ENCRYPTION
  28. #cmakedefine UA_ENABLE_HISTORIZING
  29. #cmakedefine UA_ENABLE_SUBSCRIPTIONS_EVENTS
  30. /* Multithreading */
  31. #cmakedefine UA_ENABLE_MULTITHREADING
  32. #cmakedefine UA_ENABLE_IMMUTABLE_NODES
  33. #if defined(UA_ENABLE_MULTITHREADING) && !defined(UA_ENABLE_IMMUTABLE_NODES)
  34. #error "The multithreading feature requires nodes to be immutable"
  35. #endif
  36. /* Advanced Options */
  37. #cmakedefine UA_ENABLE_STATUSCODE_DESCRIPTIONS
  38. #cmakedefine UA_ENABLE_TYPENAMES
  39. #cmakedefine UA_ENABLE_NODESET_COMPILER_DESCRIPTIONS
  40. #cmakedefine UA_ENABLE_DETERMINISTIC_RNG
  41. #cmakedefine UA_ENABLE_NONSTANDARD_UDP
  42. #cmakedefine UA_ENABLE_DISCOVERY
  43. #cmakedefine UA_ENABLE_DISCOVERY_MULTICAST
  44. #cmakedefine UA_ENABLE_QUERY
  45. #cmakedefine UA_ENABLE_DISCOVERY_SEMAPHORE
  46. #cmakedefine UA_ENABLE_UNIT_TEST_FAILURE_HOOKS
  47. #cmakedefine UA_ENABLE_VALGRIND_INTERACTIVE
  48. #define UA_VALGRIND_INTERACTIVE_INTERVAL ${UA_VALGRIND_INTERACTIVE_INTERVAL}
  49. #cmakedefine UA_GENERATED_NAMESPACE_ZERO
  50. /* Options for Debugging */
  51. #cmakedefine UA_DEBUG
  52. #cmakedefine UA_DEBUG_DUMP_PKGS
  53. /**
  54. * Function Export
  55. * ---------------
  56. * On Win32: Define ``UA_DYNAMIC_LINKING`` and ``UA_DYNAMIC_LINKING_EXPORT`` in
  57. * order to export symbols for a DLL. Define ``UA_DYNAMIC_LINKING`` only to
  58. * import symbols from a DLL.*/
  59. #cmakedefine UA_DYNAMIC_LINKING
  60. /* Shortcuts for extern "C" declarations */
  61. #if !defined(_UA_BEGIN_DECLS)
  62. # ifdef __cplusplus
  63. # define _UA_BEGIN_DECLS extern "C" {
  64. # else
  65. # define _UA_BEGIN_DECLS
  66. # endif
  67. #endif
  68. #if !defined(_UA_END_DECLS)
  69. # ifdef __cplusplus
  70. # define _UA_END_DECLS }
  71. # else
  72. # define _UA_END_DECLS
  73. # endif
  74. #endif
  75. /* Select default architecture if non is selected through CMake or compiler define */
  76. #if ${UA_ARCHITECTURES_NODEF}
  77. # ifdef _WIN32
  78. # define UA_ARCHITECTURE_WIN32
  79. # else
  80. # define UA_ARCHITECTURE_POSIX
  81. # endif
  82. #endif
  83. #include "ua_architecture.h"
  84. #endif /* UA_CONFIG_H_ */