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 /intern/atomic
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 'intern/atomic')
-rw-r--r--intern/atomic/intern/atomic_ops_utils.h3
-rw-r--r--intern/atomic/tests/atomic_test.cc8
2 files changed, 3 insertions, 8 deletions
diff --git a/intern/atomic/intern/atomic_ops_utils.h b/intern/atomic/intern/atomic_ops_utils.h
index 533cfbe9e1f..1c4cef564c3 100644
--- a/intern/atomic/intern/atomic_ops_utils.h
+++ b/intern/atomic/intern/atomic_ops_utils.h
@@ -106,8 +106,7 @@
/* Copied from BLI_utils... */
/* C++ can't use _Static_assert, expects static_assert() but c++0x only,
* Coverity also errors out. */
-#if (!defined(__cplusplus)) && (!defined(__COVERITY__)) && \
- (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 406)) /* gcc4.6+ only */
+#if (!defined(__cplusplus)) && (!defined(__COVERITY__)) && (defined(__GNUC__)) /* GCC only. */
# define ATOMIC_STATIC_ASSERT(a, msg) __extension__ _Static_assert(a, msg);
#else
/* Code adapted from http://www.pixelbeat.org/programming/gcc/static_assert.html */
diff --git a/intern/atomic/tests/atomic_test.cc b/intern/atomic/tests/atomic_test.cc
index 37a66cf0e9c..6c0e96b9d91 100644
--- a/intern/atomic/tests/atomic_test.cc
+++ b/intern/atomic/tests/atomic_test.cc
@@ -6,12 +6,8 @@
#include "testing/testing.h"
#ifdef __GNUC__
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 406 /* gcc4.6+ only */
-# pragma GCC diagnostic error "-Wsign-compare"
-# endif
-# if (__GNUC__ * 100 + __GNUC_MINOR__) >= 408
-# pragma GCC diagnostic error "-Wsign-conversion"
-# endif
+# pragma GCC diagnostic error "-Wsign-compare"
+# pragma GCC diagnostic error "-Wsign-conversion"
#endif
/* -------------------------------------------------------------------- */