Skip to content

Commit

Permalink
override cpp standard
Browse files Browse the repository at this point in the history
  • Loading branch information
benbovy committed Oct 20, 2022
1 parent f48f346 commit 349fdd2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions recipe/allow_override_cpp_standard.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f080b4b..a771744 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ endif()
# undefined symbol errors since ABSL_HAVE_STD_STRING_VIEW etc will
# end up defined differently. There is probably a better way to achieve
# this than assuming what absl used.
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 11 CACHE STRING "The C++ standard to build with")
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# No compiler-specific extensions, i.e. -std=c++11, not -std=gnu++11.
set(CMAKE_CXX_EXTENSIONS OFF)
2 changes: 2 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ source:
patches:
# use gtest shipped by conda-forge instead of building it from source
- use_installed_gtest.patch
# TODO: remove for version > 0.10.0
- allow_override_cpp_standard.patch

build:
number: 0
Expand Down

0 comments on commit 349fdd2

Please sign in to comment.