Skip to content

Commit

Permalink
Improve handling of #include <*intrin.h> (#190)
Browse files Browse the repository at this point in the history
* Don't use __has_include, it may report files exist when they don't.
* _WIN32 and __x86_64__ seem to be the most universal controls

Signed-off-by: Cary Phillips <[email protected]>
  • Loading branch information
cary-ilm committed Jul 30, 2021
1 parent b924915 commit 5cc46f3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Imath/half.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,10 @@
/// floats in question.
///

#if defined(__has_include) && defined(__x86_64__)
# if __has_include(<x86intrin.h>)
# include <x86intrin.h>
# elif __has_include(<intrin.h>)
#ifdef _WIN32
# include <intrin.h>
# endif
#elif defined(__x86_64__)
# include <x86intrin.h>
#endif

#include <stdint.h>
Expand Down

0 comments on commit 5cc46f3

Please sign in to comment.