From 349fdd2f487f54b23121c165defeee525b7e6d11 Mon Sep 17 00:00:00 2001 From: Benoit Bovy Date: Thu, 20 Oct 2022 08:58:04 +0200 Subject: [PATCH] override cpp standard --- recipe/allow_override_cpp_standard.patch | 13 +++++++++++++ recipe/meta.yaml | 2 ++ 2 files changed, 15 insertions(+) create mode 100644 recipe/allow_override_cpp_standard.patch diff --git a/recipe/allow_override_cpp_standard.patch b/recipe/allow_override_cpp_standard.patch new file mode 100644 index 0000000..96821e7 --- /dev/null +++ b/recipe/allow_override_cpp_standard.patch @@ -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) diff --git a/recipe/meta.yaml b/recipe/meta.yaml index 05f5c34..4c19424 100644 --- a/recipe/meta.yaml +++ b/recipe/meta.yaml @@ -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