Skip to content

Commit

Permalink
For portability test the __has_include operator is a supported operat…
Browse files Browse the repository at this point in the history
…or before using it
  • Loading branch information
kingsley-cheung committed Jun 3, 2022
1 parent ddda7ed commit f7de082
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions config/catch/CatchFakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
#include "fakeit/DefaultFakeit.hpp"
#include "fakeit/EventHandler.hpp"
#include "mockutils/to_string.hpp"
#if __has_include("catch2/catch.hpp")
# include <catch2/catch.hpp>
#elif __has_include("catch2/catch_all.hpp")
# include <catch2/catch_assertion_result.hpp>
# include <catch2/catch_test_macros.hpp>
#elif __has_include("catch_amalgamated.hpp")
# include <catch_amalgamated.hpp>
#if defined __has_include
# if __has_include("catch2/catch.hpp")
# include <catch2/catch.hpp>
# elif __has_include("catch2/catch_all.hpp")
# include <catch2/catch_assertion_result.hpp>
# include <catch2/catch_test_macros.hpp>
# elif __has_include("catch_amalgamated.hpp")
# include <catch_amalgamated.hpp>
# else
# include <catch.hpp>
# endif
#else
# include <catch.hpp>
# include <catch2/catch.hpp>
#endif

namespace fakeit {
Expand Down

0 comments on commit f7de082

Please sign in to comment.