diff options
author | Marco Poletti <poletti.marco@gmail.com> | 2016-01-31 09:46:24 +0000 |
---|---|---|
committer | Marco Poletti <poletti.marco@gmail.com> | 2016-01-31 09:46:24 +0000 |
commit | c8ecca8ea71d862e0bb64b533484a7a23767b75f (patch) | |
tree | e3ec615c05fb65891bee46df37a7a9d4fffd529f /configuration | |
parent | 0d5e069f4f81cd18b56be56bf777856ac890828e (diff) | |
download | google-fruit-c8ecca8ea71d862e0bb64b533484a7a23767b75f.tar.gz |
Add draft BUILD files for the Bazel build system. Building with Bazel currently doesn't work, it results in this compile error:
INFO: Found 1 target...
ERROR: /home/marco/projects/fruit/BUILD:2:1: undeclared inclusion(s) in rule '//:fruit':
this rule is missing dependency declarations for the following files included by 'src/demangle_type_name.cpp':
'/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stdarg.h'
'/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stddef.h'
'/usr/lib64/gcc/x86_64-suse-linux/4.8/include/stdint.h'.
Target //:fruit failed to build
INFO: Elapsed time: 0.808s, Critical Path: 0.38s
It's not clear if that's a Bazel issue or I'm missing something in the config.
Diffstat (limited to 'configuration')
-rw-r--r-- | configuration/bazel/fruit/CMakeLists.txt | 0 | ||||
-rw-r--r-- | configuration/bazel/fruit/impl/fruit-config-base.h | 52 |
2 files changed, 52 insertions, 0 deletions
diff --git a/configuration/bazel/fruit/CMakeLists.txt b/configuration/bazel/fruit/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/configuration/bazel/fruit/CMakeLists.txt diff --git a/configuration/bazel/fruit/impl/fruit-config-base.h b/configuration/bazel/fruit/impl/fruit-config-base.h new file mode 100644 index 0000000..46c1bf1 --- /dev/null +++ b/configuration/bazel/fruit/impl/fruit-config-base.h @@ -0,0 +1,52 @@ +/* + * Copyright 2014 Google Inc. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef FRUIT_CONFIG_BASE_H +#define FRUIT_CONFIG_BASE_H + +// Look at the macros below and decide which to keep and which to comment out based on the compiler +// and STL in use. Then comment this #error out. +#error "You need to manually edit fruit-config-base.h to configure Fruit for Bazel." + +// Needed for all Clang versions (as of January 2016), not needed for GCC. +// This can also be defined for GCC, but it slightly slows down compile time of code using Fruit. +#define FRUIT_HAS_CLANG_ARBITRARY_OVERLOAD_RESOLUTION_BUG 1 + +// Whether the compiler defines std::max_align_t. +#define FRUIT_HAS_STD_MAX_ALIGN_T 1 + +// Whether the compiler defines ::max_align_t. +// Ignored if FRUIT_HAS_STD_MAX_ALIGN_T is set. +#define FRUIT_HAS_MAX_ALIGN_T 1 + +// Whether the compiler defines std::is_trivially_copyable. +#define FRUIT_HAS_STD_IS_TRIVIALLY_COPYABLE 1 + +// Whether the compiler defines __has_trivial_copy. +// Ignored if FRUIT_HAS_STD_IS_TRIVIALLY_COPYABLE is set. +#define FRUIT_HAS_HAS_TRIVIAL_COPY 1 + +// Whether the compiler defines __is_trivially_copyable. +// Ignored if FRUIT_HAS_STD_IS_TRIVIALLY_COPYABLE is set. +#define FRUIT_HAS_IS_TRIVIALLY_COPYABLE 1 + +// Whether typeid() is available. Typically, it is unless RTTI is disabled. +#define FRUIT_HAS_TYPEID 1 + +// Whether abi::__cxa_demangle() is available after including cxxabi.h. +#define FRUIT_HAS_CXA_DEMANGLE 1 + +#endif // FRUIT_CONFIG_BASE_H |