COMPMID-3701: Avoid macro clashing
authorGeorgios Pinitas <georgios.pinitas@arm.com>
Wed, 11 Nov 2020 10:54:52 +0000 (10:54 +0000)
committerGeorgios Pinitas <georgios.pinitas@arm.com>
Thu, 12 Nov 2020 10:35:13 +0000 (10:35 +0000)
Prefix macros in Version.h with ARM_COMPUTE_ and undef if not needed.

Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Change-Id: Ie9607f6655550519863be55ec34490f45ccfa55e
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/4379
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Sang-Hoon Park <sang-hoon.park@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>

arm_compute/core/Version.h

index 3a2c7832234c2fb39ccb24f7f38e6129678d3675..a4d307950aad10f72d9d97436c3b7ee693d6364b 100644 (file)
 #include <string>
 
 /* Macro utilities */
-#define STRINGIFY2(s) #s
-#define STRINGIFY(s) STRINGIFY2(s)
+#define ARM_COMPUTE_STRINGIFY2(s) #s
+#define ARM_COMPUTE_STRINGIFY(s) ARM_COMPUTE_STRINGIFY2(s)
 
-#define ARM_COMPUTE_VERSION_STR          \
-    STRINGIFY(ARM_COMPUTE_VERSION_MAJOR) \
-    "." STRINGIFY(ARM_COMPUTE_VERSION_MINOR) "." STRINGIFY(ARM_COMPUTE_VERSION_PATCH)
+#define ARM_COMPUTE_VERSION_STR                      \
+    ARM_COMPUTE_STRINGIFY(ARM_COMPUTE_VERSION_MAJOR) \
+    "." ARM_COMPUTE_STRINGIFY(ARM_COMPUTE_VERSION_MINOR) "." ARM_COMPUTE_STRINGIFY(ARM_COMPUTE_VERSION_PATCH)
 
 namespace arm_compute
 {
@@ -45,4 +45,7 @@ namespace arm_compute
 std::string build_information();
 } // namespace arm_compute
 
+#undef ARM_COMPUTE_STRINGIFY
+#undef ARM_COMPUTE_STRINGIFY2
+
 #endif /* ARM_COMPUTE_LIBRARY_VERSION_H */