Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-09-26 05:26:48 +0300
committerCampbell Barton <campbell@blender.org>2022-09-27 00:05:13 +0300
commitbcb7b119ae5240632b7f8b07f926c230f3c48daf (patch)
treee2ad3dc3fe145f4506c9178d8652bdb0752a55e4 /source/blender/blenlib/BLI_strict_flags.h
parentcd7e9a1ad5b4f60934c4d95d81968788331db94a (diff)
Cleanup: remove workarounds and version checks for unsupported compilers
Match minimum supported versions from the WIKI [0] by raising them to: - GCC 9.3.1 - CLANG 8.0 - MVCS 2019 (16.9.16 / 1928) Details: - Add CMake checks that ensure supported compiler versions early on. - Previously GCC per-processor version checks served to exclude `__clang__`, in some cases this has been replaced by explicitly excluding `__clang__`. This was needed as CLANG treated some of these flags differently to GCC, causing the build to fail. - Remove USE_APPLE_OMP_FIX GCC-4.2 OpenMP workaround. - Remove linking error workaround for old MSVC versions. [0]: https://wiki.blender.org/wiki/Building_Blender Reviewed by: brecht, LazyDodo Ref D16068
Diffstat (limited to 'source/blender/blenlib/BLI_strict_flags.h')
-rw-r--r--source/blender/blenlib/BLI_strict_flags.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/blenlib/BLI_strict_flags.h b/source/blender/blenlib/BLI_strict_flags.h
index 8489871d5da..cc5b5dce363 100644
--- a/source/blender/blenlib/BLI_strict_flags.h
+++ b/source/blender/blenlib/BLI_strict_flags.h
@@ -9,16 +9,12 @@
*/
#ifdef __GNUC__
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
+/* NOTE(@campbellbarton): CLANG behaves slightly differently to GCC,
+ * these can be enabled but do so carefully as they can introduce build-errors. */
+# if !defined(__clang__)
# pragma GCC diagnostic error "-Wsign-compare"
-# endif
-# if __GNUC__ >= 6 /* gcc6+ only */
# pragma GCC diagnostic error "-Wconversion"
-# endif
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
-/* gcc4.8+ only (behavior changed to ignore globals). */
# pragma GCC diagnostic error "-Wshadow"
-/* older gcc changed behavior with ternary */
# pragma GCC diagnostic error "-Wsign-conversion"
# endif
/* pedantic gives too many issues, developers can define this for own use */