Skip to content

Commit 05b0694

Browse files
authored
Fix vs2019 & namespace for install targets (#349)
* Change export namespace from `s2` to `s2::` * Add absl dependency to Config.cmake.in * Use C++14 form of `static_assert`
1 parent 5c2190a commit 05b0694

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ install(TARGETS s2 EXPORT s2Targets)
441441
# that they can referenced by downstream projects as `s2::s2` after a
442442
# successful `find_package` call.
443443
install(EXPORT s2Targets
444-
NAMESPACE s2
444+
NAMESPACE s2::
445445
FILE s2Targets.cmake
446446
DESTINATION share/s2/)
447447

Config.cmake.in

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
@PACKAGE_INIT@
22

3+
include(CMakeFindDependencyMacro)
4+
find_dependency(absl CONFIG)
5+
36
include("${CMAKE_CURRENT_LIST_DIR}/s2Targets.cmake")

src/s2/s2lax_polygon_shape.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace {
5050
template <typename T>
5151
unique_ptr<T> make_unique_for_overwrite(size_t n) {
5252
// We only need to support this one variant.
53-
static_assert(std::is_array<T>::value);
53+
static_assert(std::is_array<T>::value, "T must be an array type");
5454
return unique_ptr<T>(new typename absl::remove_extent_t<T>[n]);
5555
}
5656
} // namespace

0 commit comments

Comments
 (0)