third_party.pigweed.src/pw_minimal_cpp_stdlib/CMakeLists.txt
Wyatt Hepler 023f35bab5 pw_polyfill, pw_minimal_cpp_stdlib: Fix namespace
- Clang / libc++ require standard library names to be defined in a
  special namespace. If they are simply declared in namespace std,
  strange errors can occur. This caused problems with std::span. Update
  pw_polyfill to add a macro that provides the std namespace
  declaration.
- Update pw_polyfill and pw_minimal_cpp_stdlib to use the new std
  namespace macro.
- Fully isolate the pw_minimal_cpp_stdlib library tests from the rest of
  Pigweed, since Pigweed builds with the standard library. This prevents
  isolates potentially conflicting standard library defintions.

Change-Id: I1a095e8ac879757ffba6796239e70785cc328cd7
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/13240
Reviewed-by: Rob Mohr <mohrr@google.com>
Reviewed-by: David Rogers <davidrogers@google.com>
Commit-Queue: Wyatt Hepler <hepler@google.com>
2020-07-01 19:21:52 +00:00

17 lines
697 B
CMake

# Copyright 2020 The Pigweed Authors
#
# 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
#
# https://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.
add_library(pw_minimal_cpp_stdlib INTERFACE)
target_include_directories(pw_minimal_cpp_stdlib INTERFACE public)