Skip to content

Commit

Permalink
workaround for invalid-constexpr with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceIm committed Mar 4, 2021
1 parent abb921f commit dc170c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/protobuf/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def _configure_cmake(self):
self._cmake.definitions["protobuf_DISABLE_RTTI"] = True # TODO: create an option for 3.15.4+?
if self.settings.compiler.get_safe("runtime"):
self._cmake.definitions["protobuf_MSVC_STATIC_RUNTIME"] = str(self.settings.compiler.runtime) in ["MT", "MTd", "static"]
if self.settings.compiler == "clang":
# Required at least for 3.15.4
self._cmake.definitions["CMAKE_C_FLAGS"] = "-Wno-invalid-constexpr"
self._cmake.definitions["CMAKE_CXX_FLAGS"] = "-Wno-invalid-constexpr"
self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake

Expand Down

0 comments on commit dc170c4

Please sign in to comment.