Skip to content

Commit

Permalink
refactor cpp_version.hpp and file_path.hpp for compiler version checks
Browse files Browse the repository at this point in the history
  • Loading branch information
barnasm1 committed Jan 16, 2025
1 parent f34b2d2 commit 2d071bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/common/util/include/openvino/util/cpp_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
16 changes: 16 additions & 0 deletions src/common/util/include/openvino/util/file_path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)};
Expand Down

0 comments on commit 2d071bf

Please sign in to comment.