// Copyright 2017 Google Inc. // // 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. #include "google/cloud/internal/build_info.h" #include "google/cloud/internal/compiler_info.h" #include #include namespace google { namespace cloud { inline namespace GOOGLE_CLOUD_CPP_NS { namespace internal { // NOLINTNEXTLINE(readability-identifier-naming) std::string compiler() { return CompilerId() + " " + CompilerVersion(); } // NOLINTNEXTLINE(readability-identifier-naming) std::string compiler_flags() { static char const kCompilerFlags[] = R"""(@CMAKE_CXX_FLAGS@ ${CMAKE_CXX_FLAGS_${GOOGLE_CLOUD_CPP_BUILD_TYPE_UPPER}})"""; return kCompilerFlags; } // NOLINTNEXTLINE(readability-identifier-naming) std::string build_metadata() { // Sometimes GOOGLE_CLOUD_CPP_BUILD_METADATA string expands to nothing, and // then clang-tidy complains. // NOLINTNEXTLINE(readability-redundant-string-init) static char const kBuildMetadata[] = R"""(@GOOGLE_CLOUD_CPP_BUILD_METADATA@)"""; return kBuildMetadata; } } // namespace internal } // namespace GOOGLE_CLOUD_CPP_NS } // namespace cloud } // namespace google