Viskores  1.0
OptionParser.h
Go to the documentation of this file.
1 //============================================================================
2 // The contents of this file are covered by the Viskores license. See
3 // LICENSE.txt for details.
4 //
5 // By contributing to this file, all contributors agree to the Developer
6 // Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
7 //============================================================================
8 
9 //============================================================================
10 // Copyright (c) Kitware, Inc.
11 // All rights reserved.
12 // See LICENSE.txt for details.
13 //
14 // This software is distributed WITHOUT ANY WARRANTY; without even
15 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
16 // PURPOSE. See the above copyright notice for more information.
17 //============================================================================
18 #ifndef viskores_cont_internal_OptionParser_h
19 #define viskores_cont_internal_OptionParser_h
20 
21 // For warning suppression macros:
23 
25 
26 // Preemptively load any includes required by optionparser.h so they don't get embedded in
27 // our namespace.
28 #ifdef _MSC_VER
29 #include <intrin.h>
30 #pragma intrinsic(_BitScanReverse)
31 #endif
32 
33 // We are embedding the code in optionparser.h in a Viskores namespace so that if other code
34 // is using a different version the two don't get mixed up.
35 
36 namespace viskores
37 {
38 namespace cont
39 {
40 namespace internal
41 {
42 
43 
44 // Check to make sure that optionparser.h has not been included before. If it has, remove its
45 // header guard so we can include it again under our namespace.
46 #ifdef OPTIONPARSER_H_
47 #undef OPTIONPARSER_H_
48 #define VISKORES_REMOVED_OPTIONPARSER_HEADER_GUARD
49 #endif
50 
51 // Include from third party.
52 // @cond NONE
53 #include <viskores/thirdparty/optionparser/viskoresoptionparser/optionparser.h>
54 // @endcond
55 
56 // Now restore the header guards as before so that other includes of (possibly different versions
57 // of) optionparser.h work as expected.
58 #ifdef VISKORES_REMOVED_OPTIONPARSER_HEADER_GUARD
59 // Keep header guard, but remove the macro we defined to detect that it was there.
60 #undef VISKORES_REMOVED_OPTIONPARSER_HEADER_GUARD
61 #else
62 // Remove the header guard for other inclusion.
63 #undef OPTIONPARSER_H_
64 #endif
65 
66 } // namespace viskores::cont::internal
67 } // namespace viskores::cont
68 } // namespace viskores
69 
71 
72 #endif //viskores_cont_internal_OptionParser_h
VISKORES_THIRDPARTY_POST_INCLUDE
#define VISKORES_THIRDPARTY_POST_INCLUDE
Definition: Configure.h:200
ExportMacros.h
viskores
Groups connected points that have the same field value.
Definition: Atomic.h:27
VISKORES_THIRDPARTY_PRE_INCLUDE
#define VISKORES_THIRDPARTY_PRE_INCLUDE
Definition: Configure.h:199