Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:27:16

0001 //
0002 //  Copyright 2019 The Abseil Authors.
0003 //
0004 // Licensed under the Apache License, Version 2.0 (the "License");
0005 // you may not use this file except in compliance with the License.
0006 // You may obtain a copy of the License at
0007 //
0008 //      https://www.apache.org/licenses/LICENSE-2.0
0009 //
0010 // Unless required by applicable law or agreed to in writing, software
0011 // distributed under the License is distributed on an "AS IS" BASIS,
0012 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0013 // See the License for the specific language governing permissions and
0014 // limitations under the License.
0015 
0016 #ifndef ABSL_FLAGS_CONFIG_H_
0017 #define ABSL_FLAGS_CONFIG_H_
0018 
0019 // Determine if we should strip string literals from the Flag objects.
0020 // By default we strip string literals on mobile platforms.
0021 #if !defined(ABSL_FLAGS_STRIP_NAMES)
0022 
0023 #if defined(__ANDROID__)
0024 #define ABSL_FLAGS_STRIP_NAMES 1
0025 
0026 #elif defined(__APPLE__)
0027 #include <TargetConditionals.h>
0028 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
0029 #define ABSL_FLAGS_STRIP_NAMES 1
0030 #elif defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED
0031 #define ABSL_FLAGS_STRIP_NAMES 1
0032 #endif  // TARGET_OS_*
0033 #endif
0034 
0035 #endif  // !defined(ABSL_FLAGS_STRIP_NAMES)
0036 
0037 #if !defined(ABSL_FLAGS_STRIP_NAMES)
0038 // If ABSL_FLAGS_STRIP_NAMES wasn't set on the command line or above,
0039 // the default is not to strip.
0040 #define ABSL_FLAGS_STRIP_NAMES 0
0041 #endif
0042 
0043 #if !defined(ABSL_FLAGS_STRIP_HELP)
0044 // By default, if we strip names, we also strip help.
0045 #define ABSL_FLAGS_STRIP_HELP ABSL_FLAGS_STRIP_NAMES
0046 #endif
0047 
0048 // These macros represent the "source of truth" for the list of supported
0049 // built-in types.
0050 #define ABSL_FLAGS_INTERNAL_BUILTIN_TYPES(A) \
0051   A(bool, bool)                              \
0052   A(short, short)                            \
0053   A(unsigned short, unsigned_short)          \
0054   A(int, int)                                \
0055   A(unsigned int, unsigned_int)              \
0056   A(long, long)                              \
0057   A(unsigned long, unsigned_long)            \
0058   A(long long, long_long)                    \
0059   A(unsigned long long, unsigned_long_long)  \
0060   A(double, double)                          \
0061   A(float, float)
0062 
0063 #define ABSL_FLAGS_INTERNAL_SUPPORTED_TYPES(A) \
0064   ABSL_FLAGS_INTERNAL_BUILTIN_TYPES(A)         \
0065   A(std::string, std_string)                   \
0066   A(std::vector<std::string>, std_vector_of_string)
0067 
0068 #endif  // ABSL_FLAGS_CONFIG_H_