Skip to content

Commit

Permalink
Add geographiclib/1.51
Browse files Browse the repository at this point in the history
  • Loading branch information
hdhauk committed Jan 18, 2021
1 parent bb7e3a5 commit 81df2f5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
4 changes: 3 additions & 1 deletion recipes/geographiclib/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ sources:
"1.50.1":
url: "https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.50.1.tar.gz"
sha256: "d1765009e068b8cc5e76957e5d6be45ce6cff08c4aad8e5995e84a28354385f1"

"1.51":
url: "https://sourceforge.net/projects/geographiclib/files/distrib/GeographicLib-1.51.tar.gz"
sha256: "34370949617df5105bd6961e0b91581aef758dc455fe8629eb5858516022d310"
16 changes: 16 additions & 0 deletions recipes/geographiclib/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from conans import ConanFile, CMake, tools
from conans.errors import ConanInvalidConfiguration
import os

required_conan_version = ">=1.28.0"
Expand All @@ -23,9 +24,24 @@ def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC

@property
def _min_compiler_version_default_cxx11(self):
# Minimum compiler version having c++ standard >= 11
return {
"gcc": 6,
"clang": 6,
"Visual Studio": 14, # guess
}.get(str(self.settings.compiler))

def configure(self):
if self.options.shared:
del self.options.fPIC
if tools.Version(self.version) >= "1.51":
if self.settings.compiler.cppstd:
tools.min_cppstd(self, 11)
elif tools.Version(self.settings.compiler.version) < self._min_compiler_version_default_cxx11:
raise ConanInvalidConfiguration("C++11 support needed for version >= 1.51")


def source(self):
tools.get(**self.conan_data["sources"][self.version])
Expand Down
2 changes: 2 additions & 0 deletions recipes/geographiclib/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"1.50.1":
folder: all
"1.51":
folder: all

0 comments on commit 81df2f5

Please sign in to comment.