From 2d071bffe0aba27a1f3a382dfbd98283f5e29d7d Mon Sep 17 00:00:00 2001 From: "Barnas, Michal" Date: Thu, 16 Jan 2025 12:31:51 +0100 Subject: [PATCH] refactor cpp_version.hpp and file_path.hpp for compiler version checks --- .../util/include/openvino/util/cpp_version.hpp | 16 ---------------- .../util/include/openvino/util/file_path.hpp | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/common/util/include/openvino/util/cpp_version.hpp b/src/common/util/include/openvino/util/cpp_version.hpp index 4ee65a6d5c7a4b..c0998588027c2a 100644 --- a/src/common/util/include/openvino/util/cpp_version.hpp +++ b/src/common/util/include/openvino/util/cpp_version.hpp @@ -33,19 +33,3 @@ # endif # endif #endif - -#if !defined(__GNUC__) || (__GNUC__ > 12 || __GNUC__ == 12 && __GNUC_MINOR__ >= 3) -# define GCC_NOT_USED_OR_VER_AT_LEAST_12_3 -#endif - -#if !defined(__clang__) || defined(__clang__) && __clang_major__ >= 17 -# define CLANG_NOT_USED_OR_VER_AT_LEAST_17 -#endif - -#if defined(__GNUC__) && (__GNUC__ < 12 || __GNUC__ == 12 && __GNUC_MINOR__ < 3) -# define GCC_VER_LESS_THEN_12_3 -#endif - -#if defined(__clang__) && __clang_major__ < 17 -# define CLANG_VER_LESS_THEN_17 -#endif diff --git a/src/common/util/include/openvino/util/file_path.hpp b/src/common/util/include/openvino/util/file_path.hpp index 8da67a969510bc..761b3d3c8e4837 100644 --- a/src/common/util/include/openvino/util/file_path.hpp +++ b/src/common/util/include/openvino/util/file_path.hpp @@ -36,6 +36,22 @@ using Path = std::filesystem::path; using Path = std::experimental::filesystem::path; #endif +#if !defined(__GNUC__) || (__GNUC__ > 12 || __GNUC__ == 12 && __GNUC_MINOR__ >= 3) +# define GCC_NOT_USED_OR_VER_AT_LEAST_12_3 +#endif + +#if !defined(__clang__) || defined(__clang__) && __clang_major__ >= 17 +# define CLANG_NOT_USED_OR_VER_AT_LEAST_17 +#endif + +#if defined(__GNUC__) && (__GNUC__ < 12 || __GNUC__ == 12 && __GNUC_MINOR__ < 3) +# define GCC_VER_LESS_THEN_12_3 +#endif + +#if defined(__clang__) && __clang_major__ < 17 +# define CLANG_VER_LESS_THEN_17 +#endif + #if defined(GCC_VER_LESS_THEN_12_3) || defined(CLANG_VER_LESS_THEN_17) inline ov::util::Path WPath(const std::wstring& wpath) { return {ov::util::wstring_to_string(wpath)};