Skip to content

Commit

Permalink
Silence some warnings from TBB in MSVC.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluescarni committed Mar 5, 2021
1 parent b9133f4 commit 4e81060
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/batch_evaluators/thread_bfe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,23 @@ see https://www.gnu.org/licenses/. */
#include <limits>
#include <stdexcept>

#if defined(_MSC_VER)

// Disable a warning from MSVC in the TBB code.
#pragma warning(push)
#pragma warning(disable : 4324)

#endif

#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>

#if defined(_MSC_VER)

#pragma warning(pop)

#endif

#include <pagmo/batch_evaluators/thread_bfe.hpp>
#include <pagmo/bfe.hpp>
#include <pagmo/exceptions.hpp>
Expand Down
14 changes: 14 additions & 0 deletions src/detail/bfe_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,23 @@ see https://www.gnu.org/licenses/. */
#include <stdexcept>
#include <string>

#if defined(_MSC_VER)

// Disable a warning from MSVC in the TBB code.
#pragma warning(push)
#pragma warning(disable : 4324)

#endif

#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>

#if defined(_MSC_VER)

#pragma warning(pop)

#endif

#include <pagmo/detail/bfe_impl.hpp>
#include <pagmo/exceptions.hpp>
#include <pagmo/problem.hpp>
Expand Down
14 changes: 14 additions & 0 deletions src/islands/thread_island.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,22 @@ see https://www.gnu.org/licenses/. */
#include <string>
#include <utility>

#if defined(_MSC_VER)

// Disable a warning from MSVC in the TBB code.
#pragma warning(push)
#pragma warning(disable : 4324)

#endif

#include <tbb/task_group.h>

#if defined(_MSC_VER)

#pragma warning(pop)

#endif

#include <pagmo/algorithm.hpp>
#include <pagmo/detail/gte_getter.hpp>
#include <pagmo/exceptions.hpp>
Expand Down
14 changes: 14 additions & 0 deletions src/problems/translate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,23 @@ see https://www.gnu.org/licenses/. */
#include <utility>
#include <vector>

#if defined(_MSC_VER)

// Disable a warning from MSVC in the TBB code.
#pragma warning(push)
#pragma warning(disable : 4324)

#endif

#include <tbb/blocked_range.h>
#include <tbb/parallel_for.h>

#if defined(_MSC_VER)

#pragma warning(pop)

#endif

#include <pagmo/exceptions.hpp>
#include <pagmo/io.hpp>
#include <pagmo/problem.hpp>
Expand Down

0 comments on commit 4e81060

Please sign in to comment.