2019-04-15 23:24:21 +00:00
|
|
|
//============================================================================
|
2018-12-06 18:33:31 +00:00
|
|
|
// Copyright (c) Kitware, Inc.
|
|
|
|
// All rights reserved.
|
|
|
|
// See LICENSE.txt for details.
|
|
|
|
//
|
|
|
|
// This software is distributed WITHOUT ANY WARRANTY; without even
|
|
|
|
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
// PURPOSE. See the above copyright notice for more information.
|
2019-04-15 23:24:21 +00:00
|
|
|
//============================================================================
|
2019-03-20 16:29:03 +00:00
|
|
|
#ifndef vtk_m_cont_internal_OptionParser_h
|
|
|
|
#define vtk_m_cont_internal_OptionParser_h
|
2018-11-05 16:51:14 +00:00
|
|
|
|
|
|
|
// For warning suppression macros:
|
|
|
|
#include <vtkm/internal/ExportMacros.h>
|
|
|
|
|
2019-03-20 16:29:03 +00:00
|
|
|
VTKM_THIRDPARTY_PRE_INCLUDE
|
2014-02-10 18:58:41 +00:00
|
|
|
|
2019-03-20 16:29:03 +00:00
|
|
|
// Preemptively load any includes required by optionparser.h so they don't get embedded in
|
|
|
|
// our namespace.
|
2014-05-19 18:20:59 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#include <intrin.h>
|
2018-11-05 16:51:14 +00:00
|
|
|
#pragma intrinsic(_BitScanReverse)
|
2014-05-19 18:20:59 +00:00
|
|
|
#endif
|
|
|
|
|
2019-03-20 16:29:03 +00:00
|
|
|
// We are embedding the code in optionparser.h in a VTK-m namespace so that if other code
|
|
|
|
// is using a different version the two don't get mixed up.
|
|
|
|
|
2017-05-18 14:29:41 +00:00
|
|
|
namespace vtkm
|
|
|
|
{
|
2018-12-06 18:33:31 +00:00
|
|
|
namespace cont
|
|
|
|
{
|
|
|
|
namespace internal
|
2017-05-18 14:29:41 +00:00
|
|
|
{
|
2014-02-10 18:58:41 +00:00
|
|
|
|
2021-05-26 19:43:36 +00:00
|
|
|
|
2019-03-20 16:29:03 +00:00
|
|
|
// Check to make sure that optionparser.h has not been included before. If it has, remove its
|
|
|
|
// header guard so we can include it again under our namespace.
|
|
|
|
#ifdef OPTIONPARSER_H_
|
|
|
|
#undef OPTIONPARSER_H_
|
|
|
|
#define VTK_M_REMOVED_OPTIONPARSER_HEADER_GUARD
|
2014-02-10 18:58:41 +00:00
|
|
|
#endif
|
|
|
|
|
2019-03-20 16:29:03 +00:00
|
|
|
// Include from third party.
|
2020-03-23 23:55:46 +00:00
|
|
|
// @cond NONE
|
2021-10-28 17:26:06 +00:00
|
|
|
#include <vtkm/thirdparty/optionparser/vtkmoptionparser/optionparser.h>
|
2020-03-23 23:55:46 +00:00
|
|
|
// @endcond
|
2019-03-20 16:29:03 +00:00
|
|
|
|
|
|
|
// Now restore the header guards as before so that other includes of (possibly different versions
|
|
|
|
// of) optionparser.h work as expected.
|
|
|
|
#ifdef VTK_M_REMOVED_OPTIONPARSER_HEADER_GUARD
|
|
|
|
// Keep header guard, but remove the macro we defined to detect that it was there.
|
|
|
|
#undef VTK_M_REMOVED_OPTIONPARSER_HEADER_GUARD
|
|
|
|
#else
|
|
|
|
// Remove the header guard for other inclusion.
|
|
|
|
#undef OPTIONPARSER_H_
|
|
|
|
#endif
|
2021-05-26 19:43:36 +00:00
|
|
|
|
2018-12-06 18:33:31 +00:00
|
|
|
} // namespace vtkm::cont::internal
|
2021-05-26 19:43:36 +00:00
|
|
|
} // namespace vtkm::cont
|
|
|
|
} // namespace vtkm
|
2014-02-10 18:58:41 +00:00
|
|
|
|
2019-03-20 16:29:03 +00:00
|
|
|
VTKM_THIRDPARTY_POST_INCLUDE
|
|
|
|
|
|
|
|
#endif //vtk_m_cont_internal_OptionParser_h
|